The Movie Database Support Forum

Hi, I have created a test app on JSBin in order to test requests to the API but i all i receive is an Access-Control-Allow-Origin alert. How can I allow my app to connect successfully to the API ?

Here is my request : xhr.open("GET", "https://api.themoviedb.org/3/movie/550?api_key=[key]");

Here is the alert : XMLHttpRequest cannot load https://api.themoviedb.org/3/movie/550?api_key=[key]. Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true.

Thank you.

2 Antworten (Seite 1 von 1)

Jump to last post

Hi @tocausan

You need to use JSONP with a callback. Here's a jQuery example (just make sure to swap out your API key).

Thanks a lot !

Es fehlt ein Film oder eine Serie? Logge dich ein zum Ergänzen.

Allgemein

s Fokus auf Suchfeld
p Profil öffnen
esc Fenster schließen
? Tastenkürzel anzeigen

Videos

b Zurück
e Bearbeiten

Staffeln

Nächste Staffel
Vorherige Staffel

Episoden

Nächste Episode
Vorherige Episode

Bilder

a Poster oder Hintergrundbild hinzufügen

Editieren

t Sprachauswahl öffnen
ctrl+ s Speichern

Diskussionen

n Neue Diskussion erstellen
w Beobachten an / aus
p Diskussion öffentlich / privat
c Diskussion öffnen / schließen
a Diskussionsverlauf anzeigen
r Auf Diskussion antworten
l Letzte Antwort anzeigen
ctrl+ enter Senden
Nächste Seite
Vorherige Seite

Einstellungen

Diesen Eintrag bewerten oder zu einer Liste hinzufügen?

Anmelden