I'm working on a project in javascript with the brawl stars api that is on this site "https://developer.brawlstars.com/#/" and I've already followed the documentation, I've checked my ip, my authorization header and I'm always getting the same CORS error: "Access-Control-Allow-Origin header is present on the request resource" follow my code below
const tag = '...'
const token = '...'
const url = 'https://api.brawlstars.com/v1/players/%23'
const options = {
headers: {
'Authorization': 'Bearer'+' '+ token
}
}
fetch(url+tag,options)
.then(res => res.json())
.then(data => console.log(data))