Extra points for follower

Hello,
I am writing a Bot that give the users a amount of points every minute and it should give them more if they are follower.

So my question is: What is the best way to check if the user is a follower? Should I check per user or should I get the whole list of followers from the channel. Because in both ways I would send a lot of requests to the API.

Thank you.

The easiest way would be to use the Check User Follows by Channel endpoint. The other option is to get the entire list of followers, cache it, and check against the cache. Refresh the cache as needed.

Ok Thank you. But isnt it a Problem that I use the API very very often and fast at the beginning from the Stream?

You could cache the entire list of followers while the stream isn’t even live, then just check the first page of the followers list every few minutes for updates.

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