Code HTTP Message
3 401 Authentication failed: You do not have permissions to access the service.
7 401 Invalid API key: You must be granted a valid key.
10 401 Suspended API key: Access to your account has been suspended, contact TMDb.
14 401 Authentication failed.
16 401 Device denied.
17 401 Session denied.
30 401 Invalid username and/or password: You did not provide a valid login.
31 401 Account disabled: Your account is no longer active. Contact TMDb if this is an error.
32 401 Email not verified: Your email address has not been verified.
33 401 Invalid request token: The request token is either expired or invalid.
34 401 The resource you requested could not be found.
35 401 Invalid token.
36 401 This token hasn't been granted write permission by the user.
38 401 You don't have permission to edit this resource.
39 401 This resource is private.
Can you let us know which of these error responses you received?
If it's working then the problem isn't with your API Key.
The problem must be in the code that is building your API Request, or something like that,
and is sending the Request to the TMDb Server.
It is very common to find people here with this type of problem.
A little mistake, a copy and paste with an extra space, or less character, an exchange of characters,
a quote left, use a dash when it should be underline, in short a typo and the answer can be that.
Even if the API Key is correct. The Requisition is that it has a little mistake.
I will place 6 API requests here. The first 5 with error.
You can see that the API Key is correct but the answer is Invalid API key or could not be found.
My suggestion is to check if there is any way for you to view the API Request that your APP is sending to the TMDb server.
Not the construction of the code, but the requisition built, final.
If possible, post the Request here.
If this is not possible, then you need to check in your code if there is a mistake, like the mistake in the examples above.
The error is usually in this segment of the API Request: ....?api_key=12345....
The code was working fine before, but I haven't been using it for a while. I only use it for academic purposes. But for some reason the API key became invalid. I regenerated a new one and everything worked as before.
תגובה מאת ticao2 🇧🇷 pt-BR
ב-אפריל 28, 2023 ב-8:13לפני חצות יום
Can you tell us which of the 401 errors is occurring?
See the list of TMDb server error warnings here.
https://www.themoviedb.org/documentation/api/status-codes
In your case:
Can you let us know which of these error responses you received?
תגובה מאת Argonath
ב-אוקטובר 26, 2023 ב-4:33אחרי חצות יום
I'm getting this same 401 error. In my case it says
However, my key is valid. What seems to be the problem?
Thanks
תגובה מאת ticao2 🇧🇷 pt-BR
ב-אוקטובר 26, 2023 ב-4:37אחרי חצות יום
You can check if your API Key is working properly.
Just replace THE_KEY with your Key and open it in a new tab or window in your browser.
If it's working then the problem isn't with your API Key.
The problem must be in the code that is building your API Request, or something like that,
and is sending the Request to the TMDb Server.
It is very common to find people here with this type of problem.
A little mistake, a copy and paste with an extra space, or less character, an exchange of characters,
a quote left, use a dash when it should be underline, in short a typo and the answer can be that.
Even if the API Key is correct. The Requisition is that it has a little mistake.
I will place 6 API requests here. The first 5 with error.
You can see that the API Key is correct but the answer is Invalid API key or could not be found.
My suggestion is to check if there is any way for you to view the API Request that your APP is sending to the TMDb server.
Not the construction of the code, but the requisition built, final.
If possible, post the Request here.
If this is not possible, then you need to check in your code if there is a mistake, like the mistake in the examples above.
The error is usually in this segment of the API Request: ....?api_key=12345....
תגובה מאת Argonath
ב-אוקטובר 26, 2023 ב-6:32אחרי חצות יום
The code was working fine before, but I haven't been using it for a while. I only use it for academic purposes. But for some reason the API key became invalid. I regenerated a new one and everything worked as before.
Thanks