The Movie Database-støtte

Hi, i'm trying to learn to use json file and download the file in order to process data, my task is just accademical one. When I try to use the API key I get the following error: SSLCertVerificationError in my python code. it seems that my api key is not valid, but when i generate a http link i see the json script generated correctly. So I don't understand if my credentials are valid or not. My API key: 'THE_KEY'

3 svar (på side 1 av 1)

Jump to last post

@robusa2 said:
API key doesn't work
Hi, i'm trying to learn to use json file and download the file in order to process data, my task is just accademical one.
When I try to use the API key I get the following error: SSLCertVerificationError in my python code.
it seems that my api key is not valid, but when i generate a http link i see the json script generated correctly.
So I don't understand if my credentials are valid or not. My API key: 'THE_KEY'

If you tested the URL and received the data then your API is valid.
I also tested their API Key and it worked without any issues.

I will replace your API Key with THE_KEY expression.
It is not good to show your Key to all forum users.

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.

https://api.themoviedb.org/3/movie/550?api_key=THE_KEY  

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.

1 https://api.themoviedb.org/3/movie/550&api_key=THE_KEY  
2 https://api.themoviedb.org/3/movie/550/api_key=THE_KEY  
3 https://api.themoviedb.org/3/movie/550?api-key=THE_KEY  
4 https://api.themoviedb.org/3/movie/550? api_key=THE_KEY    
5 https://api.themoviedb.org/3/movie/'550'?api_key=THE_KEY  
6 https://api.themoviedb.org/3/movie/550?api_key=THE_KEY    

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....

Hi @robusa2, this is possibly a known python error caused by using a certificate library that is no longer supported. See the following:

https://stackoverflow.com/questions/10667960/python-requests-throwing-sslerror

https://stackoverflow.com/questions/51390968/python-ssl-certificate-verify-error

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

Global

s focus the search bar
p åpne profilmenyen
esc lukk et åpent vindu
? open keyboard shortcut window

On media pages

b gå tilbake (eller til foreldresiden når mulig)
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

Innstillinger

Vil du vurdere eller legge til dette elementet i en liste?

Logg inn