Get my own subscribers from a request? Where to start?

Step 1) Setup a user oAuth flow https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow
Step 2) Get a token for your own account with channel:read:subscriptions applied to it
Step 3) Call the subscribers endpoint periodically to total up your subscribers https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions
Step 4) When your token expires, use the refresh token to get a new token https://dev.twitch.tv/docs/authentication#refreshing-access-tokens

This NodeJS example demonstrates a server capable of obtaining a User Access Token https://github.com/BarryCarlyon/twitch_misc/tree/master/authentication/user_access_generator/nodejs

That should get you going but where are you getting stuck?

1 Like