TSocial TSocial
Open in Telegram
Better in TelegramOpen in Telegram

Telegram Bot Rate Limits and Flood Control

· 4 min read · 18+ readers

Telegram Bot Rate Limits and Flood Control: TSocial guide cover card

Telegram protects its servers and its users by limiting how fast a bot icon bot can send. If you go over, Telegram answers with an error and may slow you down. Respecting limits is part of building a bot that lasts. This guide summarises the limits Telegram has documented, how to handle the errors and how to send to many people safely. Numbers can change, so read the section on flood limits in the Bot API FAQ before you depend on them.

The documented guidance

The Bot code icon API FAQ describes the limits in general terms. As of the last time we checked:

  • In a single chat, avoid sending more than about one message per second. Short bursts are tolerated, but sustained higher rates lead to errors.
  • In a group, a bot should not send more than about 20 messages per minute.
  • For broadcasting to many chats, stay under roughly 30 messages per second in total. Telegram also describes a paid broadcast option for higher throughput, paid in Telegram Stars star icon Stars. See the allow_paid_broadcast parameter in the reference.

Treat these as guidelines, not guarantees. Other methods, such as editing messages or answering callback queries, have their own behaviour.

What the error looks like

When you go too fast you get HTTP 429:

{
  "ok": false,
  "error_code": 429,
  "description": "Too Many Requests: retry after 12",
  "parameters": { "retry_after": 12 }
}

Wait at least retry_after seconds before calling again. Ignoring it makes things worse and can lead to longer penalties.

A simple limiter and retry

const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

async function call(method, body, tries = 5) {
  for (let i = 0; i < tries; i++) {
    const res = await fetch(`https://api.telegram.org/bot${process.env.BOT_TOKEN}/${method}`, {
      method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body),
    });
    const j = await res.json();
    if (j.ok) return j.result;
    if (j.error_code === 429) { await sleep(((j.parameters?.retry_after ?? 1) + 1) * 1000); continue; }
    throw new Error(`${method}: ${j.error_code} ${j.description}`);
  }
  throw new Error(`${method}: gave up after retries`);
}

For many messages, put them in a queue and release them at a steady rate, for example 20 per second, with a worker that respects retry_after.

Broadcasting responsibly

Sending the same message to many users is allowed only to people who started your bot, and spamming breaks Telegram's rules. If you must broadcast:

  1. Segment and send only relevant messages.
  2. Spread the sends over time. A list of 10,000 at 20 per second takes about eight minutes.
  3. Handle blocks. If you get 403 Forbidden: bot was blocked by the user, mark that user inactive and stop messaging them.
  4. Track failures and do not retry permanent errors.
  5. Offer an opt-out and honour it.
  6. Avoid repeated promotions. High block rates harm your bot's standing.

See automating welcome and follow-up messages.

Other limits to know

  • Message text up to 4096 characters, captions shorter.
  • callback_data up to 64 bytes.
  • Inline results per answer, command counts and file sizes have their own limits. See the reference.
  • Webhook delivery respects max_connections.
  • The getUpdates limit parameter caps updates per call.

Design for limits

  • Do not send a long text as many tiny messages. Combine them.
  • Edit a message rather than sending a new one when showing progress, within sensible rates.
  • Use answerCallbackQuery once per button press.
  • Cache file_id values rather than re-uploading files.
  • Add jitter to scheduled jobs, so they do not all fire at the same second.

Serverless considerations

If you use functions that run in parallel, a burst of invocations can exceed limits even if each function is polite. Use a shared queue with a concurrency cap. See webhooks on Lambda or a small server.

Quick checklist

  • A queue paces outgoing messages.
  • 429 responses wait for retry_after and then retry.
  • Broadcasts go only to people who started the bot.
  • 403 blocked users are marked inactive.
  • Messages are combined instead of split into many small ones.
  • Jobs use jitter so they do not all fire together.
  • Serverless concurrency is capped.
  • Limits are re-checked in the official FAQ each quarter.

Monitoring

Track the number of 429 responses per day. A rising count means your pacing is too aggressive or traffic has grown. Alert on it, and review your queue settings before Telegram restricts the bot.

Frequently asked questions

What happens if I keep ignoring 429?

Telegram may extend the wait or restrict the bot. Always back off.

Are there different limits for groups and channels?

Yes. Group and channel megaphone icon channel posting have their own guidance. Check the FAQ.

Can I pay for higher limits?

Telegram describes a paid broadcast option using Stars. Read the current terms before using it.

Do edits count?

Yes, they count towards request rates.

Related guides

More in Build on Telegram

All topics: Build on Telegram · Guide index · Explore Telegram · About TSocial

Telegram Bot Rate Limits and Flood Control | TSocial