Bazoogle:
When they click that, they log into their twitch account and they can see what permissions are being requested. If they’re okay with you seeing it, they click “Allow” and it automatically redirects them to your registered URL with information added to the end of it. The redirection will be something like
localhost:3000#access_token=aSeriesOfRandomNumbersAndLetters&scope=channel_subscriptions&token_type=bearer
Now you take the access_token and you can use that to follow to documentation on accessing the users subscriptions with WebSockets.
You’d want to use code
from OAuth authorization code flow
rather than implicit as you get an access and refresh token. Otherwise your token is only good for 60 days. Then you have to go thru this all over again rather than use the refresh token to automate a new token.
BarryCarlyon:
For normal oAuth the flow is
Step 1 of oAuth is send the user you want to get notifications for to Twitch in a Web Browser to accept of decline the connection of their Twitch account to your Application.
Step 2 they come back to your redirect with a code
Step 3 you exchange the code for an access token and a refresh token
Then you use the access token till it expires.
When it expires, you use the refresh token to get a new access token.
MountainRiderAK:
I’ve read it several times (maybe several dozen times by now) and I don’t understand it. I’m trying to remember when I last saw documentation this bad, but it was probably back in the 1990s, and I don’t remember the specific product.
This is basic oAuth, a code flow for it works for many services that support it just replace the URL’s for the ones for that service
Documentation bugs/revisements can be suggested via the uservoice
https://twitch.uservoice.com/forums/310213-developers?category_id=358000
system
Closed
July 15, 2020, 8:41am
22
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.