Dev iconDevSep 4, 2026 ~1 min source read

Handle Telegram Bot API Rate Limits in PHP: 429, Retry-After, Outbound Queues, and Grouping

Hit them and you get HTTP 429 Too Many Requests with a Retry-After in seconds, or worse, silent drops during broadcasts. A small outbound queue that serializes sends per chat and globally throttles.

Handle Telegram Bot API Rate Limits in PHP: 429, Retry-After, Outbound Queues, and Grouping

Share this story

Send the public story page.

Useful takeaways from this story.

Hit them and you get HTTP 429 Too Many Requests with a Retry-After in seconds, or worse, silent drops during broadcasts.

A small outbound queue that serializes sends per chat and globally throttles.

Common breakage during mass mailings (same text, fan-out, duplicate sends).

Building the complete brief

The page is ready to read now. The fuller skim-friendly version will appear here automatically.

The useful part

Hit them and you get HTTP 429 Too Many Requests with a Retry-After in seconds, or worse, silent drops during broadcasts. A small outbound queue that serializes sends per chat and globally throttles. Common breakage during mass mailings (same text, fan-out, duplicate sends).

How it works

  • It is a working PHP pattern you can drop into a webhook handler.
  • Limits you must respect Telegram publishes these in the official docs and they are the source of truth: ~1 message per second per chat to the same chat, and ~20 messages per minute to the same group.
  • If you ignore these, Telegram will throttle you, your queue will grow, and your broadcast will look broken.

Example or evidence

  • What we build Telegram's Bot API applies per-chat and per-method limits.

Details worth keeping

Parsing 429 and Retry-After correctly in PHP cURL. Grouping bursts into a single chat to avoid the 1 msg/sec/chat ceiling. ~30 messages per second globally per bot, with short bursts allowed.

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app