The Movie Database Support

https://api.themoviedb.org/3/movie/550?api_key=MY_API_KEY works, but only Access Token Auth works for https://developer.themoviedb.org/reference/trending-movies. Using API Key on any of the Try it examples in https://developer.themoviedb.org/ does not work.

Error Message:

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

Trying different methods, https://api.themoviedb.org/3/trending/movie/day?language=en-US?api_key=MY_API_KEY does not work either.

The error message that appears below the authorization header field says "Sorry, you could not be authorized with those credentials."

It looks like this.

6 replies (on page 1 of 1)

Jump to last post

@Mayday0458 said:

Trying different methods, https://api.themoviedb.org/3/trending/movie/day?language=en-US?api_key=MY_API_KEY does not work either.

The syntax of this query is wrong. It should be : https://api.themoviedb.org/3/trending/movie/day?language=en-US&api_key=MY_API_KEY

A question mark is used in front of the parameters, but an ampersand is used between the parameters.

That worked! Thanks, I got it now.

Why does the problem occur in the Try it examples then?

Hi @Mayday0458, the "Try It!" examples only work when you select the "Access Token Auth" authentication for use in the header.

What happens when you select "API Key Auth" is it inserts your API Key into the Authorization header, which doesn't work. I would consider this a bug, it probably should either not allow you to select "API Key Auth" or convert the example to one that uses the API Key in the url.

Having the same issue...

Hi @davidirvine, the "Try It!" examples only work when you select the "Access Token Auth" authentication for use in the header.

What happens when you select "API Key Auth" is it inserts your API Key into the Authorization header, which doesn't work. I would consider this a bug, it probably should either not allow you to select "API Key Auth" or convert the example to one that uses the API Key in the url.

yeah... i understand now..

thanks for the reply... a bug for sure!

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