(api_key) is used for (queryParam) authentication of (get) requests, while (access token) is used for authentication in (head). Simple tests in the interface document can only use (access token) authentication. There is an error in the code of this document. When you select (api_key) requests, (api_key) exists in (head) instead of (queryParam), resulting in (Invalid API key)
Facing the same issue when attempting to call the search/movie API function in my C++ program. I imagine this issue comes up a lot but I don't see much of a resolution other than a confusion over the two types of key.
Facing the same issue when attempting to call the search/movie API function in my C++ program. I imagine this issue comes up a lot but I don't see much of a resolution other than a confusion over the two types of key.
Same issue facing after trying all solution mentioned above
If you are absolutely convinced that your api key is invalid, the simplest way to test it is to run a simple query in your web browser. Type or paste the query below into the address bar of your web browser and replace YOUR_API_KEY with your api key. If you get back json describing movie id 550 (The Fight Club), then your api key is valid.
Reply by 热心市民杨先生
on May 30, 2023 at 11:22 PM
You must set your head authentication method in 2 Authenticate under Getting Started, such as appkey or access token
Reply by AhmedZouari
on May 30, 2023 at 11:31 PM
i did that . my key is not valid
Reply by 热心市民杨先生
on May 31, 2023 at 12:03 AM
You can try accessing it directly with a browser (https://api.themoviedb.org/3/tv/latest?api_key=youKey),
(api_key) is used for (queryParam) authentication of (get) requests, while (access token) is used for authentication in (head). Simple tests in the interface document can only use (access token) authentication. There is an error in the code of this document. When you select (api_key) requests, (api_key) exists in (head) instead of (queryParam), resulting in (Invalid API key)
Reply by 热心市民杨先生
on May 31, 2023 at 12:03 AM
I am using translation software and the translation may not be very accurate
Reply by Nithin John
on June 1, 2023 at 12:30 PM
So, do you mean only the POST requests will work in the "Try it Out"?
Reply by 热心市民杨先生
on June 1, 2023 at 9:43 PM
Try it Out can only use Access Token Auth authentication, not API Key Auth authentication, which is not related to the request
Reply by Alucard2169
on June 2, 2023 at 5:47 AM
I am getting the same error, i even tried regenerating my key but the new key doesn't work either
I am trying to use the
find By id
query, i even tried it in vscode, but it's still not working.Also when i use it to get all the popular movies, it works as it should
Reply by 热心市民杨先生
on June 2, 2023 at 6:27 AM
You can try accessing this address directly with a browser first( https://api.themoviedb.org/3/find/nm0943104?external_source=imdb_id&api_key=youKey ), see if there is a prompt for Invalid API key
Reply by Alucard2169
on June 2, 2023 at 6:33 AM
@热心市民杨先生 Thanks a lot, it worked
Reply by Rajkumar patel
on June 3, 2023 at 11:44 AM
"status_code": 7, "status_message": "Invalid API key: You must be granted a valid key.", "success": false
Reply by Rajkumar patel
on June 3, 2023 at 12:26 PM
plz make video on youtube how to call api
Reply by Sylviaire
on June 3, 2023 at 7:14 PM
Facing the same issue when attempting to call the search/movie API function in my C++ program. I imagine this issue comes up a lot but I don't see much of a resolution other than a confusion over the two types of key.
Reply by Rajkumar patel
on June 4, 2023 at 9:32 AM
Reply by robbie3999
on June 4, 2023 at 4:44 PM
Hi @Rajkumar patel
The are a number of videos on youtube on how to use the api: https://www.youtube.com/results?search_query=tmdb+api
If you are absolutely convinced that your api key is invalid, the simplest way to test it is to run a simple query in your web browser. Type or paste the query below into the address bar of your web browser and replace YOUR_API_KEY with your api key. If you get back json describing movie id 550 (The Fight Club), then your api key is valid.
https://api.themoviedb.org/3/movie/550?api_key=YOUR_API_KEY