Telegram Bot API limits: 429 errors and how to fix them

A 429 error means your bot sent messages too fast. Learn the Bot API limits, how retry_after works, and how a queue and backoff keep your bot sending.

Direct answer

Telegram sets limits on how fast a bot can send messages, and a 429 error means your bot went past one of those limits. The fix is to wait for the number of seconds in retry_after, then send more slowly. Build a queue so messages go out one at a time at a steady pace, and never retry instantly in a loop. Most limits are per chat and per second, with tighter limits for bulk sends and for messages to groups. Your bot is not banned when you see a 429. It is being told to slow down.

What are Telegram Bot API limits?

Telegram Bot API limits are caps on how many messages a bot can send in a short period. They exist so one bot cannot flood Telegram, slow down other bots, or spam users. The limits apply to the Bot API, which is the way most bots talk to Telegram.

The limits work on more than one level. There is a limit per chat, a limit for the bot as a whole, and tighter limits for bulk messages sent to many people at once. A bot can send a steady stream of replies to different users and stay inside the limits. The same bot can hit a limit in seconds if it tries to send the same message to hundreds of users in a burst.

Telegram does not publish one fixed number that covers every case, and the exact numbers can change. Treat any number you read in a forum post as a guide, and trust the error your bot gets back. The error is the live answer. When Telegram says slow down, it also tells you for how long, and that value matters more than a number in an old blog post.

Limits also cover more than plain text. Sending photos, files, and edits counts toward the load on the API. A bot that sends a photo to every user in a list is doing far more work than a bot that sends a short text reply to one user. Plan for that. If a campaign includes media, send it in smaller batches and leave more space between sends.

What is a 429 error?

A 429 error is Telegram's answer when a bot sends requests too fast. The full name is 429 Too Many Requests. It is a standard HTTP status code, and Telegram uses it to say the bot has passed a rate limit.

The error looks like a failure, and in one sense it is. The message in that request did not go through. It is not a ban, and it is not a sign that Telegram has blocked the bot for good. It is a throttle. Telegram is asking the bot to wait, then try again at a slower pace.

A single 429 now and then is normal for a busy bot. A run of 429 errors every day is a sign the sending code needs work. The bot is sending in bursts, or it has no queue, or it retries too fast when it hits a limit. Each retry adds more load, and more load brings more 429 errors. That loop is the main thing to break.

What does retry_after mean?

When Telegram returns a 429, it includes a value called retry_after. That value is the number of seconds to wait before sending the next request to that chat or through that method. It is the most useful part of the error, and it should be read by the code, every time.

If retry_after is 5, wait at least 5 seconds. If it is 35, wait at least 35 seconds. Do not guess a shorter wait. Telegram sets that number for a reason, and a retry before it has passed will often return another 429, sometimes with a longer wait.

Some libraries surface retry_after in the error object. Some show it in the raw response. Either way, the code that sends messages should check for it and act on it. A bot that logs the 429 but keeps sending at the same speed will keep failing. A bot that reads retry_after and pauses will recover on its own.

Keep a log of retry_after values. If the values keep growing, the bot is sending too fast overall, and the queue needs to slow down. If the values stay small and rare, the bot is close to the right pace and only needs a small adjustment.

Which limits should you watch?

Limit typeWhat happensHow to handle it
Per chat, per secondToo many messages to one chat in a short burstSend one message at a time, and leave a gap between sends
Per bot, per secondToo many messages across all chats at onceUse one shared queue for the whole bot, and cap the send rate
Bulk sendsThe same message to many users at onceSend in small batches with a pause between each batch
Group messagesFast messages into a busy groupSlow the pace in groups, and avoid repeat sends to the same group
Edits and deletesMany edits to the same messageEdit only when the content changed, and avoid edit loops
Media sendsPhotos and files to many usersSend media in smaller batches, and reuse file ids where possible

Use the table as a guide for where to look first. Most 429 errors come from the first three rows. A bot that sends a campaign to a long list of users will hit the bulk limit long before it hits the per chat limit. A bot that replies to a fast group chat will hit the group limit first.

How do you handle a 429 the right way?

Handle a 429 in three steps. Stop, wait, and slow down.

Stop means the code should not retry the same request right away. An instant retry is the worst response. It adds another request to a system that just said it has too many, and it often returns a longer retry_after. Put the message back in the queue instead, and move on to other work.

Wait means honour retry_after in full. Add a small margin on top, such as one extra second, so the next send lands after the limit has cleared. If the code sends to many chats, pause the whole queue for that period, or at least pause sends to the affected chat. A pause that is too short wastes the retry. A pause that is too long only costs a few seconds.

Slow down means lower the send rate after a 429, and keep it lower for a while. If the bot was sending one message every second, try one every two seconds after a 429. If the bot was sending in batches of 50, try batches of 20. Raise the pace again only after a period with no 429 errors. A bot that returns to full speed at once will often hit the same limit again within a minute.

Add logging around this. Log the time, the chat, the method, and the retry_after value. That log shows whether the problem is one chat, one campaign, or the whole bot. It also shows whether the fix worked. A week with no 429 errors after a change is a clear result.

How do you send bulk messages without hitting limits?

Bulk sending is the most common source of 429 errors. A bot owner writes one announcement, picks a list of users, and sends it to all of them in a loop. The loop runs as fast as the code can go, and Telegram throttles it within seconds.

Send in batches. Take the list and split it into small groups, such as 20 or 30 users at a time. Send one batch, pause, then send the next. The pause between batches matters more than the batch size. A pause of a few seconds between batches lets the bot stay under the per second limit and finish the whole list without errors.

Use a queue for bulk sends. Put every message in the queue with its chat id, then let one worker send them at a steady pace. The worker reads retry_after when it appears, pauses, and carries on. The rest of the bot keeps working while the bulk send runs in the background. A user who sends a support message should not wait because a campaign is running.

Send to active users first, and skip users who blocked the bot. A blocked user returns an error for every send, and those errors waste time and add load. Keep a list of users who blocked the bot, and remove them from future campaigns. That list also keeps the bot inside Telegram's rules for bulk messaging, which only allow messages to users who started the bot or agreed to receive them.

Test a bulk send on a small list first. Send to 20 users, check the logs for 429 errors, and adjust the pace before sending to 2,000. A test that takes five minutes can save a campaign that would otherwise stall halfway through.

Does polling or a webhook change the limits?

Polling and a webhook change how the bot receives messages. They do not change the sending limits. A bot that sends too fast will get a 429 either way.

Polling asks Telegram for new messages on a regular schedule. That adds requests of its own, and a tight polling interval can add load. A bot that polls every second and sends messages in a loop has two sources of traffic. The sending limit still applies to the sends, and the polling adds to the total load on the connection.

A webhook lets Telegram push each new message to the server. That removes the polling traffic, and it is the better choice for a busy bot. The webhook does not raise the sending limit, and it does not let the bot send faster. It only makes receiving cheaper.

The choice matters for reliability. A webhook server that is slow to reply can cause Telegram to retry an update, and a retry can cause a duplicate send if the code is not careful. A polling bot that restarts can miss messages until it starts again. For more on choosing between them, see the guide to Telegram bot webhook vs polling at https://bdbots.org/blog/telegram-bot-webhook-vs-polling.

What mistakes trigger limits most often?

The first mistake is a loop with no pause. A for loop that sends a message to every user in a list, with no sleep and no queue, will hit a limit fast. Add a pause between sends, and the same code will finish the list without errors.

The second mistake is retrying on error without a wait. A bot that gets a 429 and retries the same request at once will get another 429. A bot that gets a network error and retries five times in a second will add five requests for one message. Retry with a wait, and cap the number of retries.

The third mistake is sending the same message twice. A handler that runs twice for one update, or a webhook that receives a duplicate update, can send two replies to one user. Two replies are twice the load, and they confuse the user. Use an id for each update, and skip updates you have already handled.

The fourth mistake is an echo loop. A bot that replies to its own message, or two bots that reply to each other, can send messages back and forth without end. That loop will hit a limit in seconds, and it can look like spam. Check the sender before replying, and never reply to a message from the bot itself.

The fifth mistake is no queue at all. A bot that sends a message the moment an event happens has no control over pace. Ten events in one second mean ten sends in one second. A queue turns those ten sends into a steady stream, and the bot stays inside the limits.

How do you build a queue that works?

A queue is a list of messages waiting to be sent, handled by one worker at a steady pace. It is the single most useful part of a bot that sends more than a few messages a day.

Keep the queue simple. Each item needs a chat id, the message text, and a time to send. The worker takes the first item, sends it, waits for the gap, and takes the next. If a send returns a 429, the worker reads retry_after, waits, and tries the same item again. If a send returns a blocked error, the worker marks that user and drops the item.

Set the gap based on what you see in the logs. Start with one message per second for the whole bot, and adjust from there. If the logs show no 429 errors for a week, the pace is safe. If they show 429 errors, slow down. The right pace is the fastest pace that produces no errors over a full week.

Store the queue in a database, such as MongoDB or PostgreSQL, so it survives a restart. A queue held only in memory disappears when the server restarts, and those messages are lost. A database queue also lets you see how many messages are waiting, and which chats they are for. That view helps when a campaign is running and a user asks where their message is.

Give priority to replies. A user waiting for an answer should not sit behind a bulk campaign. Use two queues, one for replies and one for campaigns, and let the reply queue go first. A campaign can wait a few minutes. A support reply should go out in seconds.

Hosting matters here. A bot that goes offline stops sending, and its queue fills up. When it comes back, it tries to send the backlog at once, and that burst can trigger a 429. The guide to Telegram bot hosting at https://bdbots.org/blog/telegram-bot-hosting-guide covers auto-restart and monitoring, so a bot stays online and its queue stays short.

What is the risk when AI builds the bot?

AI can write a bot that sends messages in an afternoon. The demo often looks finished. The problems show up after launch, when real users and real traffic arrive. Veracode's 2025 GenAI Code Security Report found AI-generated code introduced a security flaw in 45% of cases tested. Open databases, hardcoded keys, and missing access checks are the kind of flaws that do not show in a demo. They show up when real customers and real payments arrive.

AI code often has no queue, no backoff, and no retry logic. It sends a message the moment an event happens, and it retries at once when a send fails. That code works in a test with one user. It hits 429 errors on the first day with real traffic, and the retries make it worse. AI code also tends to log personal data it was never asked to store, and to skip error handling for blocked users and failed payments.

Use AI to draft and to learn. For a bot that sends to real customers, have a human review the sending code, test it with a bulk send, and own it when Telegram changes its API or a payment flow stops working.

How does BDBOTS handle limits in a real project?

BDBOTS builds Telegram bots at https://bdbots.org/services/telegram by hand in Python, with Pyrogram and Telethon, plus React, Node.js, MongoDB, PostgreSQL, and Docker. A queue is part of the build, with a steady send pace, retry_after handling, and logging for every 429. Bulk sends run in small batches, replies go first, and blocked users are removed from future campaigns.

Every project built by BDBOTS comes with lifetime free support. If something breaks, if Telegram updates its API, or if a payment flow stops working, BDBOTS helps fix it. There is no new support contract to sign, and no surprise bill for basic help. Hosting runs at 99.9% uptime, with auto-restart and monitoring. BDBOTS was founded in 2019, has completed more than 1,000 projects for over 500 clients, and offers a free consultation with a custom-priced quote within 24 hours, with a typical first reply within 24 hours. To talk through a bot idea, write to contact@bdbots.org or message @bdbots_bot on Telegram, or visit BDBOTS at https://bdbots.org/.

FAQ

Is a 429 error a ban?

No. A 429 error means the bot sent too fast and Telegram asked it to wait. Read retry_after, wait for that many seconds, and send more slowly. A bot that keeps hitting 429 errors needs a queue and a slower pace, and it is still able to send once it slows down.

How long should I wait after a 429 error?

Wait for the full retry_after value in the error, plus a small margin of one second. If retry_after is 35, wait at least 36 seconds before the next send to that chat. Retrying sooner will often return another 429 with a longer wait.

Can I send a message to 1,000 users at once?

Send it in small batches through a queue, with a pause between each batch. A loop that sends to 1,000 users as fast as possible will hit a 429 and stall. A queue that sends at a steady pace will finish the list, and it will log any blocked users so they are skipped next time.