Supporto The Movie Database

Hello,

I am getting status code 7 'Invalid API key: You must be granted a valid key.' when I utilize the 'try it' tool on the API reference page and when I apply it to by app. I copy the test node and did the install of node-fetch. Here is the code from your site and also the response. It has almost been 24 hours and on the dashboard for my API Authentication it states none of my attempts have been successful.

Copied from site and also leveraged on the site:

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

const url = 'https://api.themoviedb.org/3/authentication';
const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    Authorization: 'Bearer  //api key removed for discussion post// '
  }
};

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

Response:

{
  "status_code": 7,
  "status_message": "Invalid API key: You must be granted a valid key.",
  "success": false
}

Thank you, Colt

2 risposte (nella pagina 1 di 1)

Jump to last post

Hi @colt_shivers,

You can't use your API key as a bearer token. You need to use your request token.

If you want to use your API key, you need to send it as query parameter:

https://api.themoviedb.org/3/movie/550?api_key=###

Thank you.

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi