Hello here !
I’m working an nodejs API to retrieve subscribe but I have a problem.
I have already recovered my berear token with : https://id.twitch.tv/oauth2/token with scope : channel:read:subscriptions
But when i call : https://api.twitch.tv/helix/subscriptions i have this message :
“message”: “Missing scope: channel:read:subscriptions or channel_subscriptions”
I don’t understand why I have this message
Did you use the correct OAuth flow for a user token? It must be the Authorization Code, or Implicit flow, client credentials will not work.
I used this :
I want to get all user subs for my nodejs API
You can’t use the Client Credentials flow. That is for an App token, and does not represent a user.
To access private information, such as a channels subscriber list, you need that broadcaster to go through the Authorization Code flow if making requests on your server, or the Implicit flow if making requests client-side from a browser.
In any case, the user will necessarily have to have a form to accept ?
Yes, for all User token flows it requires sending the user the Twitch auth URL so that they can see what permissions (scopes) you are requesting, and that they can explicitly allow/deny that connection to your app.
@Dist I have a stupid question but I didn’t find where I can get my broadcaster_id ?
You can use the Get Users, or Validate Token endpoints with your OAuth token, and it will return the user associated with that token, including their
I have an other question, I want to create a EventSub for channel.subscribe but I dont know how to generate the secret in transport
It always return me a
Thanks for helping !
The secret is whatever you want it to be. Whatever string you define as the secret is what Twitch will use to sign each notification they send to you, that way you can use that secret so validate all notifications.
So I don’t understand why i have a 400 with ‘Bad transport’ with this
The fields appear good, the only thing I can suggest is use double quotes
" instead of single
' as single quotes is invalid JSON.
Yeah its work !
I double the quotes and I change Content-Type for application/json
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.