The Movie Database Support

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 replies (on page 1 of 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.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login