I’m trying to set a subscription for the eventSub goal (
channel.goal.begin/progress/end ) .
It seems that this endpoint use user authentication ( where other eventSub use app authentication ) .
But, it seems to doesn’t work for me …
If I send an user token, the API crash, and return
auth must use app access token to create webhook subscription
If I send an app token, the API crash, and return
subscription missing proper authorization …
Did I miss something ?
To use Event Sub scopeed topics do as follows
- Create a website with a link to create a user token,
- Send the broadcaster to that website
- The broadcaster logs in with Twitch
- Completely ignore the created user token
- Now create an App Access Token (no scopes needed here)
- Subscribe to event sub using the App Access Token.
Basically you need to create a link between your ClientID and the Broadcaster via Generating a user token.
Keep that user token on file in case you need to call the API
EventSub (HTTP Transport) only uses App Access Tokens.
EventSub utilises two a token approach.
As EventSub will check if your ClientID has access to the users scoped data.
Further/longer notes on this blog post I wrote How does Twitch’s new EventSub work? – Barry Carlyon
Hum … You doesn’t answer to my question, but I found my problem .
First, my problem was : EventSub Subscription Types | Twitch Developers tell to use “a user OAuth access token with scope set to channel:read:goals.” ( so, I understand “an user token”, not an App token )
Second, I forgot the scope “channel:read:goals” when asking the broadcaster token ( maybe because the sentence telling to use this scope is not the same as the others )
Adding the scope, and doing the request with the app token resolve my problem .
No it won’t
App Access Tokens cannot have scopes, scopes only apply to tokens that represent users.
This fixes the issue, but yes I didn’t note (scopes) in my instructions. (Will edit now) The Joys of a pre-coffee incomplete answer
Any EventSub topic that needs a scope, needs you to have done a user oAuth token with that scope.
But the Actual App Access Token you use with EventSub doesn’t have scopes as scopes do nothing on an App Access Token as scopes only apply to users and an App Access Token doesn’t have a user. (This is correct for Twitch oAuth not neccassirily other oAuth services)
Yes, sorry I write a little to fast .
I’m asking an user oauth access to do multiple things, including registering the subscriptions .
It’s in this call that I forgot to add the scope, App access Tokens doesn’t ask for scopes .
Yes, and in fact, all the rest is also needed for all the other subscriptions, the only missing part was the scope .
I think my misstake come from things like : in the doc,
channel:read:goals is not using the same bloc as other . So I miss it, and so miss to add it when asking the user access token .
I think the documentation about the goal subscription need to be more standard, like other
documentation . ( and I need to read more carrefully too )
yeah theres a tad of lack of clarity
Especially when EventSub works completely differently to everything else in terms of Authentication
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.