i am unable to fetch data from the api getting error----Fetch failed: Error: HTTP error! status: 401 please help me out with this
Kan ’n rolprent of TV-program nie vind nie? Teken aan om dit te skep.
Wil u hierdie item gradeer of tot ’n lys toevoeg?
Nie ’n lid nie?
Antwoord deur ticao2 🇧🇷 pt-BR
op 3 Julie 2024 om 6:01 NM
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:
Antwoord deur _nswadhina
op 4 Julie 2024 om 4:12 VM
API_KEY: undefined Request URL: https://api.themoviedb.org/3/trending/all/week?api_key=undefined&language=en-US&page=1 Fetch failed: TypeError: fetch failed actually i tested this api in postman it is working perfectly but when i am trying to fetch day through my code it is showing the above error
this is my api key--- NEXT_PUBLIC_API_KEY=9615f4f99d********
Antwoord deur Travis Bell
op 4 Julie 2024 om 12:16 NM
Well, in the text you pasted above:
You can see that your API key variable is not working properly. The URL that is getting created has the API key as
undefined
.