Total users follows endpoint

Is there work being done to the users follows endpoint? My application encountered an error getting the follows for a user using this url I looked at the response using my user id and the total response field being returned was different than the total number of followers I have on twitch as shown on my twitch page

How big was the difference between the API total and the Twitch Page? Usually it is very common for the API total field to show a lower value than your Twitch page because the Twitch page contains all users who follow, even users who are suspended from Twitch, where as the API doesn’t return results for a suspended user so the total will be the sum of the users it can return.

The response total was two higher than the twitch page. Its only a concern for me because I’m waiting for all the follows to be returned and I’m using total to determine completion before using the list. I noticed that the problem eventually “fixed” itself. I’m guessing this only occurs during the time it takes twitch to update information when channels are suspended?

If you are monitoring a channel that was suspended, and no longer is. Then thats the issue. There is a some general weirdness :tm: when a channel goes from suspended to not suspended.

For follows/subs on helix, it’s easier to just get all pages until you can get no more pages instead of using the total as a point to stop at (and yes subs has no total anyway), thats if you need every user rather than just the total

Are you supposed to use the pagination value for that purpose or do you do a diff on the current and previous response data? I seem to always get the same pagination value after each request even after adding the pagination value in the query string so I resorted to using the total as a stop point.

var url = '' + userID;
if (cursor) {
	//console.log("add cursor")
	url += '&after='+cursor
} else {
	//console.log("no cursor")

I keep paginating till data is an empty array.

Or the page has count(data) < first

(I Prefer the empty array)

1 Like

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