For a reliable Telegram bot broadcast in PHP, enqueue one delivery per recipient, pace sends with shared rate limits, and honor Telegram’s retry_after value when flood control returns a 429. A media album is still sent to one chat at a time; it is not a shortcut for messaging many subscribers.
Which Telegram rate limits should a PHP broadcaster account for?
Telegram publishes three distinct limits that affect broadcast design. Its Bots FAQ says to avoid sending more than one message per second in a single chat; short bursts may be allowed, but continued excess can result in 429 errors. For groups, bots should not send more than 20 messages per minute. For bulk notifications, the FAQ gives an approximate free rate of 30 messages per second and suggests spreading a free broadcast over a longer period, with 8–12 hours as an example. These are Telegram’s published guidelines, not a throughput guarantee for a specific bot or PHP host. Telegram Bots FAQ
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
HDMI Cable TV QAM Modulator & IPTV Server 2 Channel | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
- One-to-one chat: Treat one message per second per chat as the conservative scheduling limit.
- Group destination: Also cap delivery at 20 messages per minute to that group.
- Bot-wide broadcast: Keep free bulk sends below the approximate 30-per-second ceiling, with headroom to smooth bursts.
These controls need to work together. A global limiter alone can still send too quickly to one destination, while independent per-chat limits do not stop the combined rate across a large audience. If several workers run concurrently, coordinate limiter state centrally or through shared storage; process-local counters can collectively exceed the intended bot-wide pace.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Why use a durable queue instead of a long PHP request?
A web request that loops through thousands of subscribers is hard to pace, can exceed request timeouts, and loses its place if the process stops. A practical design accepts the broadcast, records its recipients as durable jobs, and lets background workers deliver them at a controlled rate. Telegram documents the API limits and retry signal; this queue architecture is an engineering approach, not a Telegram-mandated framework.
#1 Best Overall
- Dual HD or SD channels in compact encoder modulator form factor
- Supports both MPEG-2 or H.264 video encoding codecs
- Models available for ATSC, DVB-C, or DVB-T Television (unit comes loaded with QAM & ATSC modulation standards)
- Supports IPTV output in UDP format for unicast or multicast
- Supports EIA 608 type closed captioning on analog input
- Create the broadcast: Save immutable content or a reference to it, then create one job per recipient chat.
- Persist job state: Store a broadcast ID, chat ID, state, attempt count, and
available_attimestamp. Useful states include pending, sending, sent, retry-scheduled, and permanent failure. - Claim work safely: Have workers claim jobs atomically or with leases so two workers cannot send the same job simultaneously.
- Apply rate limits: Check both the bot-wide schedule and the destination chat’s schedule before making the API call.
- Call Telegram and inspect the response: Mark confirmed success, schedule a retry when appropriate, or expose terminal failures for review.
Persist enough response detail to diagnose failures, but do not store the bot token in job data or logs. Because the token appears in the Bot API request URL, avoid logging complete request URLs. Telegram accepts HTTPS requests using GET or POST; JSON is supported for ordinary requests, while file uploads use multipart/form-data. Telegram Bot API reference
How should PHP handle a 429 response?
Do not treat an HTTP response by itself as proof that a message was delivered. Telegram’s Bot API response has an ok field; failures include an error description, and some include additional parameters. For flood control, parameters.retry_after gives the number of seconds before the request can be repeated. Schedule the affected job no earlier than that delay.
$response = $httpClient->post($apiUrl, ['json' => $payload]);
$data = json_decode($response->getBody(), true);
if (!is_array($data)) {
// Record an invalid response and apply a bounded retry policy.
} elseif (($data['ok'] ?? false) === true) {
// Persist success and any returned message IDs.
} elseif (isset($data['parameters']['retry_after'])) {
$delay = (int) $data['parameters']['retry_after'];
// Reschedule this job no earlier than now + $delay seconds.
} else {
// Classify the failure; retry transient cases with a bounded policy,
// and surface permanent failures for review.
}
This is illustrative PHP control flow, not a tested implementation or a complete HTTP-client setup. The Bot API reference says the error-code contents may change, so avoid hard-coding assumptions beyond documented fields. Where appropriate, coordinate a flood-control cooldown across other work sharing the affected rate-limit scope; Telegram does not document the full scope of every rate-limit response.
Account for ambiguous network failures
A connection can fail after Telegram accepted a request but before the worker received its response. The Bot API reference does not promise general idempotency for an application’s broadcast jobs, so blindly retrying that job can produce a duplicate message. Track attempts and outcomes locally, use bounded retries for transient network errors, and make ambiguous cases visible for reconciliation rather than silently replaying them.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What does grouping mean in Telegram’s Bot API?
sendMediaGroup sends an album to a single chat_id and returns an array of sent Message objects. It supports photos, live photos, videos, documents, or audio; documents can only be grouped with documents, and audio with audio. It does not send one album to many subscribers in a single request. Telegram sendMediaGroup reference
For an album broadcast, store the album payload once and enqueue one delivery per destination chat. If later edits, deletion, or reconciliation depend on the result, persist the returned message IDs for each successful delivery. Do not assume album grouping reduces recipient fan-out or the number of chat deliveries.
When do paid broadcasts make sense?
Telegram’s FAQ says paid broadcasts can reach up to 1,000 messages per second, charging 0.1 Telegram Stars for each message above the free 30-per-second amount. The FAQ also says a bot needs at least 100,000 Stars in its balance and at least 100,000 monthly active users to enable paid broadcasts, and that only successfully broadcast messages are charged. These are current published terms, not a promise of available throughput for every implementation; recheck Telegram’s live documentation before relying on them. Telegram Bots FAQ
The allow_paid_broadcast parameter is available on send methods. Telegram’s changelog records its addition in Bot API 7.11 on October 31, 2024. Telegram Bot API changelog
Choose the free paced approach when the audience can wait and the completion window fits. Consider paid broadcast only if the bot meets Telegram’s eligibility conditions, the faster completion materially matters, and the Stars cost is acceptable. Either way, retain the durable queue and per-chat controls: a faster bot-wide allowance does not remove the need to handle retries or destination-specific limits.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




