Suggestion : New Follower Endpoint Feature - Get IDs Only

Currently, in order to get the full list of Followers for things like special features for our users (our channel, RobAndDan, uses a custom chat widget that displays a logo if the user follows us), we need to pull down multiple pages via the Followers Endpoint using the Cursor value.

Having 8400+ followers at this point, this is around 84 pages of full, public information for each follower. There are a few ways this can be optimized on our side of things, for example, we currently only pull down a new list every 6-12 hours, and never when we are live with the channel.

I would like to suggest a more optimized method be added to the Follower Endpoint where we can request an altered version of the follower list.

Rather than receive all public user information for 100 users at a time, could we have a method for receiving JUST the UserIDs, in a simple JSON array, in the order of Most Recent Follower to Oldest Follower. This Endpoint method could still be paginated via a cursor, but since it would only contain ID numbers, far more IDs could be packed into a single response.

As a quick example of the size of the response data, gathering the first page of our followers via the Endpoint, the total number of characters (including all JSON data structure characters) in the response was 29670 total characters. With an ID number being 8 total character (minus 100 characters for any other required data and structural character), around 3600 +/- User IDs could be passed on their own per page. If we had access to an Endpoint method like this, it could reduce our own usage of the Endpoint from 84 requests per full refresh (again, every 6-12 hours) to just around 3 requests per full refresh.

Obviously a counter argument to this could be that just getting any information for each follower is resource intensive, regardless of the amount of actual information gathered, so my idea could be just impractical. And since I dont know the specifics of the Twitch API back end systems, i dont know one way or another. Just an idea though


What would you do with just the ID?

Additional requests are generally very cheap and having the basic information most devs are going to use parts of is good for most developers. Supporting another endpoint save a few bytes from a few developers is unlikely to be worth the trouble…

Currently we store SHA256 hashes of user IDs, and then compare those to the User IDs from the EndPoint and perform the following…

  • if the user in our database is following us, but the Twitch API says they are not, we toggle their follow status in our database to false
  • if the user in our database is not following us, but the API says they are, we toggle it to true
  • if the user is not yet in our database, we create a reference to that user

I currently throttle the requests as to not go over any potential limits, but that also makes the overall time for the request process just about 2 minutes at this point (the throttle is set to a random time from 1.5 to 3.5 seconds between each request, since the bot may also be doing other API requests at the time and this helps to make sure that pulling the follower list has very little chance of hitting the limits)

It IS a very specific use case, and I fully understand that its something that a massive number of people may not get use out of. Its also one of those things where there could be larger use cases for it that are not yet evident due to the fact that it doesnt exist currently.

To me, it just seems like I am pulling a ton of redundant or useless information when all I really care about and/or need is a simple “who is following, true or false” results rather than, “who is following and what is their user icon, username, display name, full bio, etc”. There ARE times when I need that information, but the majority of the time, when it comes to follower status, a simple yes or no is all that is needed

1 Like

Twitter for example has both.

  1. Which has a limit of 200 (similar to the current Twitch one with a limit of 100)
  2. Which has a limit of 5000 (this would make it easier to get the full follower list with less requests, especially if you already have the other user info and just want to check if a new user has followed or an “old” one has unfollowed)

I would even say that this approach could be used for the following and the subscriber endpoints too.

1 Like

I also have use cases for this. Twitter offers the same. So definitely a big +1 from me.

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