Getting Channel Subscriber Count

I’m trying to figure out how I can get a channel’s subscriber count from my Python script, it was used to just notify if the channel was live, but I’ve since decided to improve it and being able to find the total subscriber count would be really useful.

At present I am using " Client credentials grant flow" to get my access token, and I am somewhat at the conclusion that I am going to need to use one of the other methods. I know I need the scope “channel:read:subscriptions” but I am not sure exactly where I request that in this access method or if it’s even possible?

You need a user oAuth flow. You cannot use a server to server flow for this

Thanks Barry, I had a feeling this was the case, I guess I’ll get started on a user oAuth flow instead.
This pretty much mandates using a website doesn’t it? It’s not possible to do simply inside Python or something?

Generally speaking if you are authenticating yourself you can use other options.

Example: Node example to illistrate the flow:

If you are authenticating someone else, then you’ll need a website to send that someone else to in order to provide permissions.

Example: any basic oAuth as you’ll need a website for the other user to interact.

1 Like

I’m interested in the other options if I was authenticating myself. If I am a moderator of another channel, I would be able to then check these things. What are those other options? I’d ideally like something stand alone that doesn’t need the other user to authenticate as they’re not tech savvy and I want to make things as simple as possible :slight_smile:

A moderator cannot access subscriber counts it requires broadcaster authentication

The linked example, open a browser click a link, hit allow, copy the code to your script the script does what the webserver would do.

It’s just four steps

  • send URL to the streamer
  • streamer hits “login”
  • streamer hits “allow access”
  • streamer closes the window

You now have an access and refresh token for the streamers account

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.