The Movie Database Support Forum

I'm following this steps:

  1. Get new request_id with: https://api.themoviedb.org/3/authentication/token/new
  2. Then get permission for this request_id: https://www.themoviedb.org/authenticate/${requestToken}?redirect_to=http://localhost:3000/new_session
  3. After try create new session_id with permitted request_id: const url = "https://api.themoviedb.org/3/authentication/session/new"; const options = { method: "POST", headers: { accept: "application/json", "content-type": "application/json", Authorization: Bearer ${requestToken}, }, };

But got error: { status_code: 7, status_message: 'Invalid API key: You must be granted a valid key.', success: false }

Am I doing right?

3 Antworten (Seite 1 von 1)

Jump to last post

@novi-movies said:

But got error: { status_code: 7, status_message: 'Invalid API key: You must be granted a valid key.', success: false }

Am I doing right?

DId you forget to put your API key?

@waffiqaziz said:

@novi-movies said:

But got error: { status_code: 7, status_message: 'Invalid API key: You must be granted a valid key.', success: false }

Am I doing right?

DId you forget to put your API key?

In my profile api settings (https://www.themoviedb.org/settings/api) two types of keys: "API Key" and "API Read Access Token". I didn't find out in what cases I have to use the "API Key". But you are right that if I use my "API Read Access Token" the request will succseed. But I was sure than I have to use new request_token to get new session_id.

@novi-movies said:

I didn't find out in what cases I have to use the "API Key".

API KEY uses as parameter

https://api.themoviedb.org/3/trending/all/week?api_key={{TMDB_API_KEY}}

while API Read Access Token as bearer token

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