For Helix Subscriber Count

No the token is not generated fron the console.

A given application doesn’t auto grant rights to a users account.

There is no Token to find as it’s not there.

This is the oAuth flow in a nutshell:

  • Create a webpage with a link as in <a href="">Login With Twitch</a>
  • This will be a link to Twitch along the lines of:

https://id.twitch.tv/oauth2/authorize?client_id=CLIENTID&redirect_uri=URLENCODEDRETURLINK&response_type=code&scope=channel:read:subscriptions

  • The user you want to read subscribers of will click this link
  • The user is then asked if they wish to allow CLIENTID access to their account.
  • The user click yes/no
  • If yes, the user is then rediredrect back to RETURNLINK with a ?code in the URL
  • The webpage at RETURNLINK then will do a POST request to Twitch to exchange that code for an access token (and a refresh token).

That access token can then be used to do sub data lookups. You will need to store the refresh token so you can get a new access token when the access token expires

This is a “one page” example in PHP that will do “regular/refreshable” User authentication that should serve as an example to build you own flow for this https://github.com/BarryCarlyon/twitch_misc/tree/main/authentication/user_access_generator/php

And example includes a script to maintain that token.

But you’ll need to determine where you store the token/refresh token for use and adjust accordingly.