Hello There !
I’m trying to do an extension with Helix but i have some trouble. I have generated my Oauth Token but i don’t know how to use it.
I use a function to retrieve the information of a streamer by its ID but the server responded with a status of 401.
async function getUserInfos() {
return await new Promise(resolve => {
$.ajax({
dataType: 'json',
headers: {'Client-ID': config.client_id,
'Authorization': config.user_acces_token},
url: "https://api.twitch.tv/helix/channels?broadcaster_id=42797849",
success: user =>
user && user.data && user.data[0]
? resolve(user.data[0])
: resolve(null)
})
});
}
Can you help me with my Token ?
Thank you !