The Movie Database Support

Expected Behaviour: Examples should show the API in URL for making a request.

Actual Behaviour: API Key is shown in the authorization header in examples and running the example is causing a 401 error.

This issue is persisting in all the examples. Also, my authorization with a token is working fine without any issue.

The example code with node-:

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

const url = 'https://api.themoviedb.org/3/authentication';
const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    Authorization: 'Bearer 2sdffsfsdeea43ba10423rt'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))

3 replies (on page 1 of 1)

Jump to last post

Agreed. The documentation shows that you should include the API key in the authorization header, but that always fails with a 401. The request only works when you pass the API key through the URL. This is very confusing to the user.

If you are using API Key use it in the URL like this. Do not put it in the header.

The examples are wrong. As explained here, if you want to use the Authorization header, this is the Bearer token that you should put in it.

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