to meet API limits. The bot sends messages only directly to users (not groups), while between the use of any two methods (send, edit, delete, callback, etc) a limit of 2 seconds is set for one chat, and an additional 0.05 seconds for all chats, this helps keep within all the restrictions described in the API (each method call is logged and I see that these limits are respected). However, sometimes I still get the 429 error, and I can’t understand why, none of the limits are violated. Are there any additional restrictions not described in the API? 20 messages per minute specifically for GROUPS? Because This is the only limit that I break, but in PERSONAL messages
Please make sure to read this article first: https://telegra.ph/So-your-bot-is-rate-limited-01-26
Yes, I found it by searching and read it, it says the same thing as in the api, and the only thing that I violate is the limit for GROUPS of 20 messages per minute, but in PERSONAL messages
What is your question now? You said you violate rate limits. Your bot gets rate limited.
its limit for groups, not for message to user, but its one of all limits what i can violate, so my question - realy this limit work only to group, or to simple users too?
If you get rate limited for sending too many messages in a group, you will also get rate limited for users too. This is expected behavior.
yes, I read it and the bot cannot be added to groups. I log any method call that accesses the telegram API, and do not violate any of the limits set for chat with the user, but I still catch 429) and wonder if there are any other restrictions that are not specified in the API
Yes, there are other methods that are also rate limited, which are not documented. But if you receive 429 errors for sendMessage, you are simply sending too many messages.
that is, for another method (for example, editmessage), the limit can be more than once per second, but is not specified in the API?
This is where I'm sure I'm making a mistake, thank you for your help!
Обсуждают сегодня