Hey guys,
I am new to twitch.
So far, I have done these steps
-
Created account with twitch
-
Added 2 Factor auth
-
Created an application and obtained the clientId
-
I am getting the access token as per the document below
-
Then I am getting the live streams as follows
-
I am trying to get the Followed streams as per the api below
-
I keep on getting the error below for the followed streams api
{“error”: “Unauthorized”,“status”: 401,“message”: “authentication failed”}
-
The API to get accesstoken is as follows
curl --location --request POST ‘https://id.twitch.tv/oauth2/token?client_id={my_client_id}&client_secret={my_client_secret}&grant_type=client_credentials&scope=user_read’- this returns back an accessToken
-
I then use the accessToken in the api below
curl --location --request GET ‘https://api.twitch.tv/kraken/streams/followed’
–header ‘Accept: application/vnd.twitchtv.v5+json’
–header ‘Client-ID: {my_client_id}’
–header ‘Authorization: Bearer {accessToken}’
I keep on getting
{
“error”: “Unauthorized”,
“status”: 401,
“message”: “authentication failed”
}
Any suggestions on what I am doing wrong?