Telegram bot api: error code 429, error: too many requests: try again

We have a telegram bot, it has about 1.2 million subscribers.

Now there is a problem sending a message with this number of subscribers.

The Telegram bot API does not provide any batch message functions, and we must send individual requests to the telegram. The problem is that after several thousand messages, the telegram begins to respond with an error 429: too many requests and does not accept any requests for some time.

How can we effectively communicate to our subscribers?

+5
source share
2 answers

I am the owner of Ramona Bot. There is a restriction on sending messages to users. as they said ~ 30 messages per second. Otherwise, you will receive error 429.

+1
source

You just need to implement a global speed limiter so that no user exceeds a fixed number of messages per second. to be safe, set the limiter below 30, maybe even up to 5 msgs per second.

In fact, anything above 5 messages per second for one user quickly becomes annoying.

greetings.

+1
source

All Articles