I’m using a bot to try to detect and announce new followers; as many have posted previously, I’m having issues with the bot getting delayed information. Unlike previous threads, however, when I visit the link in my browser ( https://api.twitch.tv/kraken/channels/dmentia_/follows ), it has updated after just a few seconds - but the bot usually takes almost 5 minutes before it gets the new follower information.
I chose to post a new thread because this is a different issue than just a delay on the API, since my browser has no delay, just my bot. I have turned off local caching on the bot as well, without change.
A twitch staff in a previous thread mentioned that follows have a 5 minute cache on the server; however, twitchalerts does not have a delay of 5 minutes (I’ve run twitchalerts and my bot at the same time, and twitchalerts is always many minutes ahead) - how could they be managing this, if the cache is 5 minutes serverside? I also seem to be getting updates to my browser in seconds, rather than minutes, which implies that it’s not an issue caused by twitch server caching. My only thought here is to try polling https://api.twitch.tv/kraken/users/(USER_ACCOUNT)/follows/channels/(STREAMER_ACCOUNT) for each user in the channel … which I assume would be bad to do at any decent interval, since I expect that would result in hundreds of requests per minute per channel (depending on the number of viewers).
I am directly printing out the results and can confirm it’s not a parsing issue, I’m just not getting the new information at all for many minutes. I am also polling the endpoint only once per 61 seconds, because according to previous threads, sometimes polling faster than once per minute can cause delays.
I have tried removing my clientID and version request properties that the bot was sending, and I seem to get the updates the same time my browser does once I’ve done so, but then they are both very delayed. This is using kraken version 2. Is it possible that once per minute is still too much, and it’s sending a cached page because of this (specific to the clientID of my bot)?
As I began writing this, my browser was receiving the updates significantly before my bot, but I spent a few hours troubleshooting as I wrote this and now both my bot and my browser are now very delayed, regardless of whether or not I pass it a clientID and kraken version - though they both seem to be getting the new information at the same time now. Is it also possible that it’s limiting me because of too many requests within a minute from my IP, then?