Questions about IRC rate limits: IP limiting and separate tiers

Hello. I have three questions about Twitch’s IRC rate limits that I have not been able to resolve by reading the docs and searching existing forum threads. The two related threads I checked are these two, and they were not clear enough about the issues I ran into.

  1. Previous forum threads seem to indicate that rate limits are by user only, and explicitly not by IP. The docs say rate limits are by user, but do not mention IP at all. However, I have run into an issue that seems to indicate the rate limits indeed are enforced by IP. I have written a bot that often gets requests in quick succession from many users. I implemented rate limiting on the bot, so if it sends 20 messages before 30 seconds have elapsed since the first message, it waits until those 30 seconds have elapsed before continuing to send messages. However, if I send one message using a separate account while the bot (running on the same network/IP) is in this cooldown mode, my entire IP gets muted for 30 minutes as if I overran the rate limit. Is there an undocumented rate limit that I am hitting, or have I missed/misunderstood something in the documentation?

  2. Are the “Non-moderator” / “Moderator” rate limits listed here in the docs fully separate? Meaning: may an account send 100 messages in 30 seconds across all channels it is a moderator in, and also send 20 messages in those same 30 seconds across all channels in which it is not a moderator? Or does the more restrictive rate limit apply immediately once it sends a message in a channel in which it is not a moderator?

  3. Do “message” rate limits apply to all communications sent to the server, or only PRIVMSGs? For example, are JOIN messages, authentication attempts, tag requests, etc included in the “20 messages in 30 seconds” rate limit? (I’m aware of the separate JOIN rate limit. I only mention JOIN messages here as an example of a “message” that can be sent to the server that is not a PRIVMSG.)

Thank you for any clarification that can be given!

  1. You should not be hitting the rate limit if you’re using different accounts. The messages user ‘Foo’ sends does not impact the rate limit of messages sent by user ‘Bar’. Also if one account does hit the rate limit it should not impact other accounts running on the same IP, so I would suggest checking your code, and ensuring each connection is in fact connected as a different Twitch account.

  2. The lowest limit applies. So You could be sending messages at a rate of 50 per 30 seconds and you’ll be fine if they’re all in a channel your bot is a moderator, but the moment you send a message in ANY channel you’re not a moderator you’ll immediately be over the limit and be banned.

  3. Joins and Auths have their own rate limits, which for non-verified bots would be 20 authentication attempts per 10 seconds per user, 20 join attempts per 10 seconds per user. I do not believe they count against the message limit.

I appreciate the reply!
As for question 1, I tested thoroughly, and I’m 100% sure I used a different account for the bot and the following message. I sent the last message using the Twitch web client, using my personal account, while the bot used its own account, on a single socket connection in Python. Once I sent that single message using my personal account, messages from both my personal account and the bot were ignored for the next 30 minutes. When I conducted the same test without sending any messages from my personal account, it worked as expected, and no mutes occurred.
Anyway, no worries if that’s all you can do to help. I’ll do more testing to make sure I’m not missing something, and work around it if I can’t solve the issue.

You may have gotten hit with spam or fraud detection by twitch. Not the rate limiter.

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