I had to kill one of my research servers because my chat bot had too many threads running as I was trying to collect twitch data for research. After I restarted the server I haven’t been able to make any api calls from that domain. I know there’s nothing wrong with my code as it works perfectly from my home PC. I was wondering if there was anyway to check if Twitch has blocked the server IP from making anymore API calls.
No, there isn’t a way to tell if you’ve been blocked. How many requests were you making to get the data?
I was making about 50 requests every hour. Which I had been doing for weeks. None of this happened until my server forcefully had to be restarted because too many processes were being run.
That’s under a request a minute, that seems plenty well within the range of acceptable values. It’s rather difficult as there is no real given value for what the rate limit actually is, but I have a discord bot that makes about double that and I seem to be fine.
Hi DallasNChains I have a question which is related to what you just said. What is the limit to number of calls to Twitch API my program can make? And if someone tries to make calls more than allowed, then what is the penalty? thanks
@Satokaheni: You shouldn’t be blocked at all. If your program as misbehaving, they would message me and have me contact you directly. Have you tried again today to see if the problem still exists?
@Ace: Our general guideline is 1 request/second. We don’t have a hard limit. If you go over the limit consistently, you’d get an email from me asking why and talking through solutions on how to not abuse the API. If you were really abusing the API, we’d block access to the API.
Just a random thought on this
I’m just wondering what processes kept starting/being run, was each process doing 50 requests an hour? and you had 100+ of them running? Possibly doing over 84 requests a second, or more?
I’m still getting nothing when I make an API call from my server when I just tried today. I just had one process that would get the list of featured streamers which when I was checking usually returns around 50 people. Then I would create a new process for each streamer to connect to the IRC channel of that chat. Then while in the chat at the start I would make an API call to get the meta-data at the start and one more at the end to get the ending meta-data. So there’s no way I was making anywhere near 1 call per second.
I’m starting to think this may be on my end. Since I can an API call from the university IP and not from my server IP, which you have to be on the universities network to access.
It was on our side. Once we reset the DNS servers I can make calls again.
What endpoint are you requesting specifically (query params, etc), and are you checking for 5xx responses? (500, 502, 503, etc) Maybe the twitch api is just throwing a fit.
Glad it is resolved!
Thanks for all your guys help.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.