Getting User OAuth Token for broadcaster?

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 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:

  1. Display a link on the extension config page which goes to a webpage I host myself
  2. On this page provide a button to trigger either implicit or code auth flow
  3. 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
  4. 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!


Looks correct to me

And that is what I would do for this example

(And yes it’s perfectly permitted by the Rules of Extensions)

Thanks Barry!

FIDDY BUCKS consultation fee! :stuck_out_tongue: