skip to Main Content

We have a Telegram bot. It has around 1.2 million subscribers.

Now we’re facing a problem in sending messages to these number of subscribers.

Telegram bot API does not provide any batch message functionality and we’d have to send individual requests to Telegram. The problem is, after a few thousand messages, Telegram starts responding with Error 429: too many requests, and does not accept any requests for a while.

How can we effectively message our subscribers?

5

Answers


  1. I’m the owner of Ramona Bot.
    There is a limit for sending message to users. as they said ~30 message per second. Otherwise you will get that Error 429.

    Login or Signup to reply.
  2. You should simply implement a global rate limiter to ensure no single user gets above a fixed number of messages per second. to be safe, set your limiter at lower than 30, maybe even to 5 msgs per second.

    Really anything higher than 5 messages per second to a single user quickly becomes an annoyance.

    cheers.

    Login or Signup to reply.
  3. Based on the Telegram Bots FAQ for sending messages, you should consider this:

    If you’re sending bulk notifications to multiple users, the API will not allow more than 30 messages per second or so. Consider spreading out notifications over large intervals of 8—12 hours for best results.

    Login or Signup to reply.
  4. I had similar problems with messages, the pause between which was 0.5 seconds (this is much less than 30 messages per second!). The problem was only associated with messages, the content of which I tried to change. So when you try to use "edit_message_text" or "edit_message_media" take more pause between messages.

    Login or Signup to reply.
  5. It can happen also if a Telegram group is in the slow mode and the bot tries to send more that one message at once to that group. I fixed this by adding a delay to the bot trigger mechanism.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search