Confused about Oauth

I’m currently using a Twitch API/Chat JavaScript library: https://github.com/Skhmt/tapic

And it requires me to pass in an Oauth to access the chat. Isn’t this supplied from the token property that the JavaScript helper onAuthorized function returns? https://dev.twitch.tv/docs/extensions/reference#javascript-helper

No

The JWT is not an oauth equivalent.

Right now there is no way as an extension to get an oauth key inside the extension, so you can’t do what you are trying to do.

The whole point of an Extension is that all operations are done in the extension, and you probably shouldn’t be needing a chat_login oauth key

1 Like

Oh thank you so much for letting me know! I’ll put this project idea on the back burner then and start working on a different idea.

Depends what scopes you are need, most of the stuff I’m working with, broadcaster scopes work for subscriber checks

1 Like

Well the Twitch API/Chat Javascript Library needed these scopes: chat_login, channel_editor but if I have no way of obtaining the oauth then I can’t use this since I need to read chat messages in a stream.

You could feasibley run a chat bot to relay chat to your EBS.

But why would you need chat_login and channel_editor from a viewer?

If you need this from the broadcaster you can obtain then, but most are wary of granting chat_login.

See https://dev.twitch.tv/docs/extensions/reference#set-extension-broadcaster-oauth-receipt for broadcaster oAuth scopes. You can request a relevant oauth key at extension activation into a slot

1 Like

I was hoping to not have to setup or use an EBS but it looks like I’ll have to look into that to see if this can be done.