Streams followed api returning 401 unauthorised

Hey guys,
I am new to twitch.

So far, I have done these steps

I keep on getting

“error”: “Unauthorized”,
“status”: 401,
“message”: “authentication failed”

Any suggestions on what I am doing wrong?

The scope here is useless. As client_credentials doesn’t represent user, so there is no user to read

So that is your problem. You tried to get the streams that a user follows, but your access token doesn’t have a user

Also for kraken it’s OAuth not Bearer

thanks BarryCarlyon for your quick reply.

I tried it again
curl --location --request POST ‘{my_id}&client_secret={my_secret}&grant_type=client_credentials

And followed api as below
curl --location --request GET ‘
–header ‘Accept: application/vnd.twitchtv.v5+json’
–header ‘Client-ID: {myId}’
–header ‘Authorization: OAuth {myToken}’

I get the error
“error”: “Unauthorized”,
“status”: 401,
“message”: “invalid oauth token”

You need to use a flow that grants a User Access Token as per the table on Authentication | Twitch Developers


OAuth Authorization Code Flow

Thanks BarryCarlyon,

I was finally able to get it working. Thanks for your help.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.