The Movie Database Support Forum

I try to Fetch MovieList with Code Generator(Official Doc), but it gives 401 error. Code Generator :https://developer.themoviedb.org/reference/collection-details

In my production, same error is occurred. Please help me.

const fetch = require('node-fetch');

const url = 'https://api.themoviedb.org/3/collection/collection_id?language=ja';
const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    Authorization: 'Bearer cfe5c0a677a38bcfd0f00a92852cf5fc'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

2 Antworten (Seite 1 von 1)

Jump to last post

@ticao2 said:

@Vegaz_KikiB said:
Authentication Error
Hello I keep receiving an authentication error.
{
"status_code": 7,
"status_message": "Invalid API key: You must be granted a valid key.",
"success": false
}

Take a Test

Click to go to your Profile > API: https://www.themoviedb.org/settings/api
At the bottom of the page, below, you'll find the Example API Request.
https://api.themoviedb.org/3/movie/550?api_key=THE_KEY
Use this example to do a search using a new tab or window in your browser.
You will receive the basic data of the Movie Fight Club (1999)
https://www.themoviedb.org/movie/550-fight-club
If it works, your Key is OK.

When there is a problem, the TMDb Server sends a message.

I regenerate API key and try this test. But I keep receive following message... {"status_code":7,"status_message":"Invalid API key: You must be granted a valid key.","success":false}

Please help me.I want to use this API by next weekend.

How long should I wait for your response?

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