My API key was working until last month.
However, When I checked my API key this month, I got 401 error with this message "Invalid API key: You must be granted a valid key".
Can you explain me why my API key Invalid?
@tjddud1191 said: API Key Invalid
My API key was working until last month.
However, When I checked my API key this month, I got 401 error with this message
"Invalid API key: You must be granted a valid key".
Can you explain me why my API key Invalid?
Better make sure your API Key has been canceled.
And the safest way is to do the test below.
Take a Test
Using a computer, desktop or notebook.
On some mobile devices this test may not work correctly.
In the URL below, change THE_KEY to your API Key. 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.
I got this error message instead of basic data of the Movie Fight Club
{"adult":false,"backdrop_path":"/hZkgoQYus5vegHoetLkCJzb17zJ.jpg","belongs_to_collection":null,"budget":63000000,"genres":[{"id":18,"name":"Drama"}],"homepage":"http://www.foxmovies.com/movies/fight-club","id":550,"imdb_id":"tt0137523","original_language":"en","original_title":"Fight Club","overview":"A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.","popularity":85.845,"poster_path":"/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg","production_companies":[{"id":711,"logo_path":"/tEiIH5QesdheJmDAqQwvtN60727.png","name":"Fox 2000 Pictures","origin_country":"US"},{"id":508,"logo_path":"/7cxRWzi4LsVm4Utfpr1hfARNurT.png","name":"Regency Enterprises","origin_country":"US"},{"id":4700,"logo_path":"/A32wmjrs9Psf4zw0uaixF0GXfxq.png","name":"The Linson Company","origin_country":"US"},{"id":25,"logo_path":"/qZCc1lty5FzX30aOCVRBLzaVmcp.png","name":"20th Century Fox","origin_country":"US"},{"id":20555,"logo_path":"/hD8yEGUBlHOcfHYbujp71vD8gZp.png","name":"Taurus Film","origin_country":"DE"}],"production_countries":[{"iso_3166_1":"DE","name":"Germany"},{"iso_3166_1":"US","name":"United States of America"}],"release_date":"1999-10-15","revenue":100853753,"runtime":139,"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"}],"status":"Released","tagline":"Mischief. Mayhem. Soap.","title":"Fight Club","video":false,"vote_average":8.44,"vote_count":27672}
Also, when I check my api authentication,
Still I got this message.
"status_message": "Invalid API key: You must be granted a valid key."
If My api Key got canceled, Can I ask why it has been canceled?
With this test we know that your API Key is still valid.
@tjddud1191 said:
However, When I checked my API key this month, I got 401 error with this message
"Invalid API key: You must be granted a valid key".
How or where did you do this check?
It was using "Try it!" in the Documents?
The "Try it!" option in DOCs it only works with the "Access Token Auth" option.
It doesn't work if you select the "API Key Auth" option.
Your API Key validation test is done using your Token. https://developer.themoviedb.org/reference/authentication-validate-key
If your Token works then your API Key must also work.
If you checked in another way, please let us know which way it was.
Take a Test
Using a computer, desktop or notebook.
On some mobile devices this test may not work correctly.
In the URL below, change THE_KEY to your API Key. 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.
Can you tell which message the server sent?
Here is a list of possible messages: https://developer.themoviedb.org/docs/errors
Yes, I tried both the aforementioned test above, as test as the authentication test page. I'm unable to get a 200 response now, although this key used to work.
@kmcowan said:
Yes, I tried both the aforementioned test above, as test as the authentication test page. I'm unable to get a 200 response now, although this key used to work.
Tested API Key and it didn't work
Create a new topic requesting it with the title: Regenerate API Key.
It will be in this new topic that you will receive the information that your API Key has been regenerated.
Or
Go to this page in your profile. https://www.themoviedb.org/settings/api
If you already have it and want it to be changed or regenerated,
request it here by clicking on "Regenerate Key":
With this test we know that your API Key is still valid.
@tjddud1191 said:
However, When I checked my API key this month, I got 401 error with this message
"Invalid API key: You must be granted a valid key".
How or where did you do this check?
It was using "Try it!" in the Documents?
The "Try it!" option in DOCs it only works with the "Access Token Auth" option.
It doesn't work if you select the "API Key Auth" option.
Your API Key validation test is done using your Token. https://developer.themoviedb.org/reference/authentication-validate-key
If your Token works then your API Key must also work.
If you checked in another way, please let us know which way it was.
It was "Try it" for "API key Auth".
Even the result of test shows my API Key is still valid, still I got fail error message on my portfolio, movie db page.
"Failed to load resource: the server responded with a status of 400 ()"
Also, my "API Key Auth" is show still failed on "API Reference - Authentication" page.
Code HTTP Message
18 400 Validation failed.
22 400 Invalid page: Pages start at 1 and max at 1000. They are expected to be an integer.
23 400 Invalid date: Format needs to be YYYY-MM-DD.
26 400 You must provide a username and password.
27 400 Too many append to response objects: The maximum number of remote calls is 20.
28 400 Invalid timezone: Please consult the documentation for a valid timezone.
29 400 You must confirm this action: Please provide a confirm=true parameter.
47 400 The input is not valid.
Also, my "API Key Auth" is show still failed on "API Reference - Authentication" page.
Nothing works on the DOC pages if the "API Key Auth" option is selected.
Only works with the "Access Token Auth" option.
@Markysan said:
My API Key is not working. Please help.
{"status_code":7,"status_message":"Invalid API key: You must be granted a valid key.","success":false}I
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 16 日 9:11下午
Better make sure your API Key has been canceled.
And the safest way is to do the test below.
Take a Test
Using a computer, desktop or notebook.
On some mobile devices this test may not work correctly.
In the URL below, change THE_KEY to your API Key.
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.
If it does not work, let us know right here.
tmdb88890333 的回复
于 2023 年 12 月 18 日 7:04下午
I got this error message instead of basic data of the Movie Fight Club
{"adult":false,"backdrop_path":"/hZkgoQYus5vegHoetLkCJzb17zJ.jpg","belongs_to_collection":null,"budget":63000000,"genres":[{"id":18,"name":"Drama"}],"homepage":"http://www.foxmovies.com/movies/fight-club","id":550,"imdb_id":"tt0137523","original_language":"en","original_title":"Fight Club","overview":"A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.","popularity":85.845,"poster_path":"/pB8BM7pdSp6B6Ih7QZ4DrQ3PmJK.jpg","production_companies":[{"id":711,"logo_path":"/tEiIH5QesdheJmDAqQwvtN60727.png","name":"Fox 2000 Pictures","origin_country":"US"},{"id":508,"logo_path":"/7cxRWzi4LsVm4Utfpr1hfARNurT.png","name":"Regency Enterprises","origin_country":"US"},{"id":4700,"logo_path":"/A32wmjrs9Psf4zw0uaixF0GXfxq.png","name":"The Linson Company","origin_country":"US"},{"id":25,"logo_path":"/qZCc1lty5FzX30aOCVRBLzaVmcp.png","name":"20th Century Fox","origin_country":"US"},{"id":20555,"logo_path":"/hD8yEGUBlHOcfHYbujp71vD8gZp.png","name":"Taurus Film","origin_country":"DE"}],"production_countries":[{"iso_3166_1":"DE","name":"Germany"},{"iso_3166_1":"US","name":"United States of America"}],"release_date":"1999-10-15","revenue":100853753,"runtime":139,"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"}],"status":"Released","tagline":"Mischief. Mayhem. Soap.","title":"Fight Club","video":false,"vote_average":8.44,"vote_count":27672}
Also, when I check my api authentication, Still I got this message. "status_message": "Invalid API key: You must be granted a valid key."
If My api Key got canceled, Can I ask why it has been canceled?
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 19 日 7:24上午
Sorry I do not understand.
You did the test I indicated above and
Choose one of the possibilities.
tmdb88890333 的回复
于 2023 年 12 月 19 日 6:58下午
Sorry, Now I understand.
The answer is 1,
I received the correct Fight Club Movie's basic "data", instead of go to https://www.themoviedb.org/movie/550-fight-club this page.
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 20 日 7:20上午
With this test we know that your API Key is still valid.
How or where did you do this check?
It was using "Try it!" in the Documents?
The "Try it!" option in DOCs it only works with the "Access Token Auth" option.
It doesn't work if you select the "API Key Auth" option.
Your API Key validation test is done using your Token.
https://developer.themoviedb.org/reference/authentication-validate-key
If your Token works then your API Key must also work.
If you checked in another way, please let us know which way it was.
kmcowan 的回复
于 2023 年 12 月 20 日 12:01下午
Hello TMDB Support ...
I am also receiving this message.
"status_message": "Invalid API key: You must be granted a valid key.",
Please advise. I did take the test above and it failed.
https://developer.themoviedb.org/reference/authentication-validate-key
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 20 日 12:59下午
Take a Test
Using a computer, desktop or notebook.
On some mobile devices this test may not work correctly.
In the URL below, change THE_KEY to your API Key.
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.
Can you tell which message the server sent?
Here is a list of possible messages:
https://developer.themoviedb.org/docs/errors
If it does not work, let us know right here.
kmcowan 的回复
于 2023 年 12 月 20 日 1:29下午
Yes, I tried both the aforementioned test above, as test as the authentication test page. I'm unable to get a 200 response now, although this key used to work.
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 20 日 2:03下午
Tested API Key and it didn't work
Create a new topic requesting it with the title: Regenerate API Key.
It will be in this new topic that you will receive the information that your API Key has been regenerated.
Or
Go to this page in your profile.
https://www.themoviedb.org/settings/api
If you already have it and want it to be changed or regenerated,
request it here by clicking on "Regenerate Key":
kmcowan 的回复
于 2023 年 12 月 20 日 2:41下午
Thank you. I was able to regenerate the key.
tmdb88890333 的回复
于 2023 年 12 月 20 日 6:40下午
It was "Try it" for "API key Auth".
Even the result of test shows my API Key is still valid, still I got fail error message on my portfolio, movie db page. "Failed to load resource: the server responded with a status of 400 ()"
Also, my "API Key Auth" is show still failed on "API Reference - Authentication" page.
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 21 日 10:56上午
I don't know if I understood correctly, but...
Then your API Key is valid.
Can you tell us which of these errors is occurring?
See the list of TMDb server error warnings here.
https://www.themoviedb.org/documentation/api/status-codes
In your case:
Nothing works on the DOC pages if the "API Key Auth" option is selected.
Only works with the "Access Token Auth" option.
Markysan 的回复
于 2023 年 12 月 22 日 5:58上午
My API Key is not working. Please help. {"status_code":7,"status_message":"Invalid API key: You must be granted a valid key.","success":false}I
ticao2 🇧🇷 pt-BR 的回复
于 2023 年 12 月 22 日 8:36上午
Read this conversation from the beginning.
First do the test indicated here:
https://www.themoviedb.org/talk/657d0eeeb7fbbd06e430013f#657e58cd8f26bc1f50751e92
If your API Request worked correctly, read this second explanation:
https://www.themoviedb.org/talk/657d0eeeb7fbbd06e430013f#6582dc0a8586785635f65e85
If your problem has not yet been resolved, follow these instructions:
https://www.themoviedb.org/talk/657d0eeeb7fbbd06e430013f#65833a81ea7b0e51fa270f0f