I am trying to get data from the new Get Polls endpoint via my extension e.g. list the last 5 polls of the broadcaster whose channel the extension is currently on.
To access this endpoint we need to use a User OAuth Token, however as far as I can tell the only way to get a token via my EBS is https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-client-credentials-flow which results in an App Access Token which cannot access the Get Polls endpoint.
If I am understanding this correctly, does that mean the only way to get a User Access Token for the broadcaster would be something like:
- Display a link on the extension config page which goes to a webpage I host myself
- On this page provide a button to trigger either implicit or code auth flow
- Redirect the broadcaster to another webpage I host myself to let them know auth has completed and they can now close the window. At this point I also communicate with my EBS to store the auth token that was just generated
- Push a message from the EBS to the config page so when the broadcaster returns they can see in Twitch auth was successful
I might be grossly misunderstanding the auth process here so quite happy to be corrected on any and everything!
Thanks