Hello,
I have developed a sub points calculator, and it worked by pulling all of the information from:
https://api.twitch.tv/helix/subscriptions?broadcaster_id=XXXXXX&first=100
and after that call, I get the pagination information back and place it in my next call:
https://api.twitch.tv/helix/subscriptions?broadcaster_id=XXXXXX&first=100&after=XXXXXX
And it worked great for months, but towards the end of July, it stopped working.
After debugging my own code and going through different channels with less subscribers, I’m at a loss here. It makes the first 9 calls just fine, but on the 10th call, the return value is always:
{"data":[],"pagination":{}}
The target broadcaster has more than 1000 subscribers, so this results in the calculation being incorrect. I always update the next call with the return value of the cursor of the previous call.
Any help would be appreciated. Thank you. I can provide more code / info if needed but I didn’t want to paste loads of code without reason.
I cannot replicate this problem.
I’m getting 5000+ subs at 100 per page on a given streamer without issue
Thank you for your quick reply. Perhaps my symptom of it being the 10th call is a red herring. Their dashboard is showing 1114 sub points, while my calculated (tier 1000 = 1, 2000 = 2, 3000 = 6) ends up being 1000. There’s always been a slight offset, which we attributed to people upgrading their tiers, but we’ve never seen 114 point disparity. I’m at a loss here on the issue.
I appreciate your time and I guess I’ll keep plugging away.
Edit: Not red herring for me, the issue on my end is definitely pagination if it be my issue or not.
I reduced the amount of subs to 1 per page and tried it on my own channel, as I only have 70 subs.
On the 30th call, I get back: {"data":[],"pagination":{}}
URL is: https://api.twitch.tv/helix/subscriptions?broadcaster_id=37749713&first=1&after=eyJiIjp7IkN1cnNvciI6IjIwMjAtMDgtMDdUMDI6MTQ6MTZaIn0sImEiOnsiQ3Vyc29yIjoiMjAyMC0wOC0wN1QwMjoxNDoxNloifX0
{“data”:[{“broadcaster_id”:“37749713”,“broadcaster_name”:“Metalus69”,“gifter_id”:"",“gifter_name”:"",“is_gift”:false,“plan_name”:“Channel Subscription (metalus69)”,“tier”:“1000”,“user_id”:“267199061”,“user_name”:“Ip_gaming1”}],“pagination”:{“cursor”:“eyJiIjp7IkN1cnNvciI6IjIwMjAtMDgtMDdUMjM6NDM6MTVaIn0sImEiOnsiQ3Vyc29yIjoiMjAyMC0wOC0wN1QyMzo0MzoxNVoifX0”}}
Fetching next resultset with pagination ID: eyJiIjp7IkN1cnNvciI6IjIwMjAtMDgtMDdUMjM6NDM6MTVaIn0sImEiOnsiQ3Vyc29yIjoiMjAyMC0wOC0wN1QyMzo0MzoxNVoifX0
URL is: https://api.twitch.tv/helix/subscriptions?broadcaster_id=37749713&first=1&after=eyJiIjp7IkN1cnNvciI6IjIwMjAtMDgtMDdUMjM6NDM6MTVaIn0sImEiOnsiQ3Vyc29yIjoiMjAyMC0wOC0wN1QyMzo0MzoxNVoifX0
{“data”:[{“broadcaster_id”:“37749713”,“broadcaster_name”:“Metalus69”,“gifter_id”:"",“gifter_name”:"",“is_gift”:false,“plan_name”:“Channel Subscription (metalus69)”,“tier”:“1000”,“user_id”:“38162465”,“user_name”:“Safire224”}],“pagination”:{“cursor”:“eyJiIjp7IkN1cnNvciI6IjIwMjAtMDgtMDdUMjM6NTM6MjdaIn0sImEiOnsiQ3Vyc29yIjoiMjAyMC0wOC0wN1QyMzo1MzoyN1oifX0”}}
Fetching next resultset with pagination ID: eyJiIjp7IkN1cnNvciI6IjIwMjAtMDgtMDdUMjM6NTM6MjdaIn0sImEiOnsiQ3Vyc29yIjoiMjAyMC0wOC0wN1QyMzo1MzoyN1oifX0
URL is: https://api.twitch.tv/helix/subscriptions?broadcaster_id=37749713&first=1&after=eyJiIjp7IkN1cnNvciI6IjIwMjAtMDgtMDdUMjM6NTM6MjdaIn0sImEiOnsiQ3Vyc29yIjoiMjAyMC0wOC0wN1QyMzo1MzoyN1oifX0
{“data”:[],“pagination”:{}}
Reached end of results, no more to fetch.
It’s a pretty simple loop call to fetch them.
Metalus:
Thank you for your quick reply. Perhaps my symptom of it being the 10th call is a red herring. Their dashboard is showing 1114 sub points, while my calculated (tier 1000 = 1, 2000 = 2, 3000 = 6) ends up being 1000. There’s always been a slight offset, which we attributed to people upgrading their tiers, but we’ve never seen 114 point disparity. I’m at a loss here on the issue.
Ah you are reporting a duplicate of
opened 03:44AM - 05 Aug 20 UTC
closed 04:53PM - 16 Sep 20 UTC
duplicate
product: api
done
**Brief description**
When using the Helix `Get Broadcaster Subscriptions` endp… oint, the set of subscriptions obtained differs from the complete list of subscribers available for download from the Channel Analytics page of a broadcaster. This difference follows a strange pattern that all the missing subs are within packs of gifted subs; the larger the pack the more are missing.
**How to reproduce**
- Use the Helix API `Get Broadcaster Subscriptions` endpoint as normal to obtain a list of all the broadcaster subscriptions
- concurrently download the list of subscribers from a user's analytics page
- compare the list of subscribers obtained via Helix to the list downloaded
- in the test I was running, there were dozens of missing subscriptions with the strange correlation that all were within gifted sub packs of at least 5. The bulk of the missing subs were in a pack of 50.
**Expected behavior**
The Helix API endpoint for subscribers has a near exact correspondence with the downloaded sub list.
opened 05:21AM - 04 Aug 20 UTC
closed 11:04PM - 09 Sep 20 UTC
product: api
ticketed
**Brief description**
While paginating through subscriptions (showing on the Da… shboard as 789) - I am only able to get to 702. This wasn't an issue until the past few days, it worked without a problem before. I have tested my code to ensure that it isn't ending pagination early, the last page, which has 2 results, has no cursor.
**How to reproduce**
Query helix/subscriptions for 100 and paginate until you receive 0 results or no cursor, compare the count
**Expected behavior**
You should be able to retrieve 100% of the subscribers from this endpoint through pagination.
(Feature request) We would have access to a count field when not specifying the optional user_id.
**Screenshots**

**Additional context or questions**
N/A - feel free to ask for more information, I'd be happy to help.
I thought you were reporting that page 10 was failing completely, not that the data you have fetched is appearing incomplete
Ah sorry thank you, I’ll close my ticket and follow those.
system
Closed
September 16, 2020, 2:54pm
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.