Hi there, I have an issue with my API Key. If I search a "top rated" with basicFetch(/trending/all/week?language=pt-BR&api_key${API_KEY}
)
but, receive "items: {status_code: 7, status_message: "Invalid API key: You must be granted a valid key.", success: false"
someone can help me?
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by yacine717
on August 27, 2021 at 2:08 PM
same problem
Reply by Travis Bell
on August 27, 2021 at 5:54 PM
Assuming you aren't putting an
=
in yourAPI_KEY
var (which seems unlikely), you're missing the HTML delimiter:Would be what you're looking for.
Reply by Kaimzr
on August 28, 2021 at 10:16 AM
Travis, Thanks for your reply, however the persistent error. and yes, i have a const with my api_key.
Reply by Travis Bell
on August 28, 2021 at 10:23 AM
What’s is the full request that isn’t working?
Reply by Kaimzr
on August 28, 2021 at 10:30 AM
Follow my code;
all requests return me, error 401 and 404, and say my api key is invalid.
Reply by ticao2 🇧🇷 pt-BR
on August 29, 2021 at 11:40 AM
I believe there are some characters missing from your Requests.
Always put your API Key after the " ? "
Try building your API Request with this other sequence:
title: 'Originais do Netflix',
https://api.themoviedb.org/3/discover/tv?with_network=213&language=pt-BRapi_key=${API_KEY}`)
https://api.themoviedb.org/3/discover/tv?api_key=THE_KEY&language=pt-BR&with_networks=213
You forgot the & character before with_network=
title: 'recomendados para Você',
https://api.themoviedb.org/3/trending/all/week?language=pt-BR&api_key=${API_KEY}`)
https://api.themoviedb.org/3/trending/all/week?api_key=THE_KEY
In trending it is not possible to specify the language (pt-BR).
title: 'em alta',
https://api.themoviedb.org/3/movie/top_rated?language=pt-BR&api_key=${API_KEY}`)
https://api.themoviedb.org/3/movie/top_rated?api_key=THE_KEY&language=pt-BR
You forgot the & character before language=
title: 'terror',
https://api.themoviedb.org/3/discover/movi?with_genres=27&language=pt-BR&api_key=${API_KEY}`)
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&with_genres=27
In this case you wrote movi, that is, movie without the " e " character at the end.
There are probably some other minor errors. :-)
Reply by ticao2 🇧🇷 pt-BR
on September 1, 2021 at 8:15 AM
See this case similar to yours
https://www.themoviedb.org/talk/612cded1d04d1a0065e8d135?page=1#612f6b53c1ffbd00630de02a
Reply by bukqueiroz
on September 1, 2021 at 9:57 PM
tnx man
Reply by ticao2 🇧🇷 pt-BR
on September 8, 2021 at 10:26 PM
A curiosity of mine, I speak pt-BR.
You are the 4 user who speaks pt-BR that comes here in the last 10 days with the same problem.
Are you taking any code programming course that uses API?
Is it a school or online?
Can you say the name of the course, where it is, etc...?
Reply by ticao2 🇧🇷 pt-BR
on September 8, 2021 at 10:27 PM
A curiosity of mine, I speak pt-BR.
You are the 4 user who speaks pt-BR that comes here in the last 10 days with the same problem.
Are you taking any code programming course that uses API?
Is it a school or online?
Can you say the name of the course, where it is, etc...?