Requesting list of subscribers returns list with incorrect sub plans

Hi there, I’m requesting the subscriber list for a channel using the v5 API endpoint Get Channel Subscribers. I’m having no problems requesting and receiving the list, however, the sub plans inside the list are all showing as the “1000” plan, despite the fact that several should actually be at higher tiers.

Is this is a known issue in the API, or should I be requesting a different endpoint?

Thanks!

Grab the whole list and look for duplicate users.

Do they appear under two plans in the list? Some people forget to cancel their original tier and are subbed twice.

I’m not getting any duplicates. The number of subscribers is correct, they’re just all at the “1000” level plan, which is incorrect. Since I’m trying to calculate sub points, this is making it impossible.

The only one in the list that is not at a 1000 tier is the auto-sub for the channel owner.

Edit: To note, I can query each user individually against the “Check if user is subscriber” endpoint and receive the correct plan, but this would obviously be very inefficient and result in 40+ API calls every time I want to calculate sub points.

There is an endpoint on the private API for the subscriber score which is what is used on the dashboard.

https://api.twitch.tv/api/channels/:channel_name/subscriber_count

Where channel_name is the name of a channel. (Not the ID) You authorize normally in the headers:

Authorization: 'OAuth ' + token

Or as part of the query string: ?oauth_token=...

This is what the data might look like for an affiliate:

{
	"count": 5,
	"score": 5,
	"count_breakdown": [
		{
			"plan": "1000",
			"count": 5
		},
		{
			"plan": "2000",
			"count": 0
		},
		{
			"plan": "3000",
			"count": 0
		}
	],
	"score_breakdown": [
		{
			"plan": "1000",
			"score": 5
		},
		{
			"plan": "2000",
			"score": 0
		},
		{
			"plan": "3000",
			"score": 0
		}
	],
	"next_level": null
}

And this is what the data might look like for a partner:

{
	"count": 154,
	"score": 172,
	"count_breakdown": [
		{
			"plan": "1000",
			"count": 144
		},
		{
			"plan": "2000",
			"count": 8
		},
		{
			"plan": "3000",
			"count": 2
		}
	],
	"score_breakdown": [
		{
			"plan": "1000",
			"score": 144
		},
		{
			"plan": "2000",
			"score": 16
		},
		{
			"plan": "3000",
			"score": 12
		}
	],
	"next_level": {
		"minimum_score": 400,
		"emoticon_limit": 18
	}
}
2 Likes

Thank you! Is this documented anywhere? This is the first I’ve heard of the private API.

That endpoint is definitely not documented anywhere. That might be the only documentation for that endpoint. I found it by just inspecting the Network tab in the dev tools in my browser on the dashboard. Generally the private API is legacy stuff or stuff that makes the site work. There’s tons of interesting data to be gotten by poking around the Network tab or at their code that runs the site.

1 Like

Thanks for the info. Hopefully they’ll expand this one to a full-fledged v5 endpoint soon enough!

I wouldn’t get your hopes up, :cry:

@jhobz We haven’t had any other reports of the endpoint returning incorrect data. Which channel is this? Just as a note, Prime and $4.99 both show up as 1000 in the API.

Mine, jhobz296. There should have been at least 2 3000 tiers and a few 2000 tiers. As I mentioned before, if I queried the user specifically, I would receive the correct tier, but the full subscriber list would only say “1000” for everyone but me.

Edit: For what it’s worth, the API endpoint used by the dashboard that @Alca mentioned produces the correct count breakdown.

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