So I'm using Movies API from TMDB API, and my code looks like this:
let apikey = '{my_apikey}';
let url: string = 'https://api.themoviedb.org/3/movie/apikey=';
url = url apikey;
console.log(url);
(async function () {
const response = await fetch(url);
const data = await response.json();
console.log(data);
})()
If I insert the url along with my API it displays the data just fine, but when I'm doing it from my app, I have the next error:

I can't figure out what could be the problem, cause my api key is fine and I copied it from the website.
CodePudding user response:
According to the API documentation. The URL should look something like this:
https://api.themoviedb.org/3/movie/76341?api_key=<<api_key>>
