I have set up my first query using a simple JS script that calls fetch() on the search URL. Calling it withing my page returns
Response {type: "cors", url: "https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&page=1apes", redirected: false, status: 200, ok: true, …} and I don't appear to get any actual data.
Whereas if I use the same search URL in the address bar, I get data returned.
I have been able to use the API of an online Recipe DB so I assume this is an issue at TMDB end?
Film of tv-serie niet gevonden? Log dan in om deze te creëren.
Want to rate or add this item to a list?
Not a member?
Reactie van ticao2 🇧🇷 pt-BR
op 17 februari 2021 om 10:22 PM
I made this conversation Private because you posted your API Key.
CORS issue
In case you have not researched here in the Forum, below the link of 3 posts with similar problem.
Maybe it helps:
https://www.themoviedb.org/talk/5f621eae93388b003864513c
https://www.themoviedb.org/talk/5eb07271a13533001b72740a
https://www.themoviedb.org/talk/5f55e3dd713ed40037f090d4
Reactie van Chillihead
op 17 februari 2021 om 10:31 PM
Oh thanks. Didn't think about obfuscating my key.
I did a search first and also saw those threads but they're of no help alas. I see 2 of them are using a library called axio which I'm not using.
Thanks anyway.
Reactie van ticao2 🇧🇷 pt-BR
op 17 februari 2021 om 10:36 PM
I think it would be better for me to obfuscate your Key and release the conversation to other users.
So they can access and eventually give some help.
Reactie van Chillihead
op 17 februari 2021 om 11:54 PM
Sounds great!