Send user to twitch with url:
https://id.twitch.tv/oauth2/authorize?client_id=<client-id>&redirect_uri=http%3A%2F%2Flocalhost&response_type=code&scope=channel%3Aread%3Asubscriptions+channel_subscriptions
Then taking the code from the redirect perform a post to:
https://id.twitch.tv/oauth2/token?client_id=<client-id>&client_secret=<secret>&code=<the-code>&grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost
Then perform the request to the channel using the returned “access_token”. Is that not the correct flow?