Rate limit reached on first call?

Hey guys,

Not sure what’s up here but my app has started having issues connecting to Twitch channels due to the dreaded “429 rate-limit exceeded” error.

I’m not a great developer so it might be my code, but I’ve been searching for a while now.

According to my calculations, the app nevers makes more than 15 or maybe 20 calls/minute, and even when it only makes 4, it’s having issues connecting. It actually seems to me I sometimes get the 429 error on the very first call.

The issue is not consistent: sometime the app will connect well, and sometimes it just won’t for hours on end.

Also, the app used to have 0 issue connecting in the past, for several months, up until a few weeks back.

I’d be curious to know if anyone else has been having that type of issue.

“Connecting” not sure what you mean?

thanks for your reply.

I mean I get the error when the app makes that call:

  const rChannel = await axios.get(`https://api.twitch.tv/helix/users`, {
    headers: headers,
    params: {
      'login': this.channel,

To provide additional context:

  • today the app was scheduled to start 10 minutes ago
  • and it did but it didn’t go through the call mentionned above… while it’s the 1st call to Twitch API made by the app since yesterday evening.

Scheduled as in a cronJob?

You sure you not got any lagging cronjobs/duplicates that are sat there spamming the API?

There must be something else on the same IP/ClientID pair hitting the API and eating your rate limit? And alternative would be to go and get an App Access Token (800 limit), but that won’t solve your root problem of something on the same IP using your rate limit up

thank you for your help.

Indeed there’s a cronjob but I’ve spent a good deal of time looking at running processes, as I thought that might have been a cause as well, and did the cleaning.

The more I look into it and the more I think the problem is not coming from Twitch API. What’s not helping is that I didn’t write that app myself…

I got a couple new ideas for a solution, that i’ll be testing today.

I got it to work!

Indeed it was the app making calls I didn’t see at first.

As I use axios to make calls, learning about “interceptors” from that post helped a lot: they help track what calls are made.

Thanks a lot for your support :sweat_smile:

1 Like

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