So after some digging turns out that newer ClientID’s made after a certain date have the CORS issue.
You can also try:
fetch(
'https://api.twitch.tv/kraken/videos/SOMEID',
{
headers: {
'client-id': 'SOMECLIENTID',
'accept': 'application/vnd.twitchtv.v5+json'
}
}
)
.then(resp => { return resp.json() })
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
In testing the issue occurs when you omit the V5 header when using a “new” client ID. It trips up and issues Two CORS headers