Getting Subscriber Count

So I just started doing front-end developement and basically I’m looking for what it says in the title,
I know this is a common question but I can’t for the life of me figure out how sites like
https://twitchstats.net/ and https://twitchtracker.com/subscribers does this.

These sites have no authentication and still manage to get subscribers.

I’m using a javascript client side solution and a CRON-job server side to update all public follower statistics but I want to get subscriber count to for my friend that is partner. But I don’t want my friend to login multiple times per day to update subscribers.

So how would you go around doing this?
I’m not looking for code or links to the documentation.
I’ve read it enough I want to learn what techniques are/should be used.

They are inaccurate.

They are logged into chat as a user and are reading the IRC USERNOTICE events.
These bots can also read chat and see whom has a “subscriber” badge and guestimate there.

Which only accounts for new subs, and resubs that choose to share their sub. And they have to guess when people unsub or don’t renew. And have no record of the ultra lurkers.

Poll the API, you only need to get the partner to login/grant you access once (or when they change/reset their password or the token expires/cannot be renewed). Was that not clear from the documentation you don’t want me to link to?

Personally depending on $otherStuff I either perform a fetch daily and then update with incoming pubsub data on the subscribers feed. Or Fetch every 3 hours for other applications. Most of the partners I work with authenticated months ago, and I only need a new token when the current one expires for whatever reason.

TLDR:

  1. You are working with a partner,
  2. get them to authorise (once) with the relevant scopes,
  3. poll the API periodically.

Personally, poll no quicker than once per three hours for a full fetch, and once per 5 minutes if you are just after the total.

Thanks for the reply.

About the documentation I think it’s mostly my lack of knowledge that makes it hard to grasp things… alot of things actually. I’m kind of in over my head. But it would definitly be a cool feature having it.

With the pubsubdata you need to count the subs yourself?
Doesn’t tokens expire after 3600s?

Tokens can be refreshed. Using the refresh token.

Seed with a poll, then add new/renewing subs to your db to count them

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