You have to go to this link:
https://id.twitch.tv/oauth2/authorize ?client_id=<your client ID> &redirect_uri=<your registered redirect URI> &response_type=<type> &scope=<space-separated list of scopes>
but instead fill out the information. This will bring your to a prompt to click “allow” that gives you, the programmer, permission to get the information from their account. So, for example, if I wanted to get permission to see a users subscriptions, I need them to give me access. So I might send them to this link
https://id.twitch.tv/oauth2/authorize?client_id=123456789&redirect_uri=localhost:3000&response_type=token&scope=channel_subscriptions
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.