Client Side API Access Trouble

What are the URLs you’re requesting and what headers are you setting? A simple fetch should work in browser.

e.g.

fetch('https://api.twitch.tv/helix/streams', { headers: { authorization: 'Bearer xx' } })
.then(r=>r.json()).then(function (r) {
    console.log(r); // { data: [ ... ], pagination: { ... } }
}