iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
For a reliable Telegram broadcast in PHP, enqueue one delivery job per recipient, then let background workers send those jobs through coordinated rate limits. Telegram’s guidance is about messages per chat, group, and bot—not one request that broadcasts to many subscribers. When a request is flood-controlled, honor the Bot API’s parameters.retry_after value before retrying.
Understand the three rate limits before sending
Telegram’s live Bots FAQ describes three different limits. They apply to different scopes, so a single global throttle is not enough:
- One chat: Avoid sending more than one message per second to a single chat. Telegram says short bursts may be allowed, but continued excess can lead to HTTP 429 errors.
- Groups: Bots should not send more than 20 messages per minute in groups.
- Bulk broadcasts: The default free broadcast rate is approximately 30 messages per second. Telegram gives 8–12 hours as an example of a window over which a free broadcast can be spread.
These are Telegram’s published guidance, not guaranteed throughput for a particular PHP host or bot. The FAQ does not state a publication year for these figures. Keep some headroom rather than treating approximately 30 messages per second as a guaranteed safe setting. Telegram Bots FAQ
Use a durable queue instead of a long web request
A broadcast-creation request should record the campaign and enqueue its recipients; background workers should do the API calls. This is an engineering approach to applying Telegram’s limits, not a queue framework mandated by Telegram. It avoids holding a web request open while a large audience is processed and gives the sender a place to track retries and failures.
#1 Best Overall
- Create the broadcast. Store the content or an immutable reference to it and assign a broadcast ID.
- Enqueue one delivery per destination. Each job should include the broadcast ID, recipient chat ID, payload reference, state, attempt count, and an
available_attime. - Claim jobs safely. Use atomic claims or leases so concurrent workers do not send the same pending job at once. Persist queue state so a process restart does not discard recipients.
- Rate-limit and send. Apply both bot-wide and per-chat scheduling before calling the Bot API.
- Record the outcome. Mark successful deliveries as sent; schedule eligible retries; make permanent failures visible for review. Keep tokens and other secrets out of logs.
When multiple workers run across processes or servers, their rate state needs to be shared or centrally coordinated. Separate process-local limiters can collectively exceed the intended bot-wide pace. This coordination requirement follows from using a shared bot-wide limit; Telegram does not prescribe a PHP worker topology.
What to store for operations
Keep enough information to diagnose a delivery without recording credentials: job state, attempt count, scheduling time, response details, and any returned Telegram message IDs needed for later edits, deletion, or reconciliation. Avoid logging a complete Bot API URL because the token appears in its URL format. Telegram Bot API reference
Rank #2
Handle 429 responses and other failures deliberately
The Bot API response includes an ok field; failed responses can include an error description, an integer error_code, and optional parameters. Telegram documents ResponseParameters.retry_after as the number of seconds remaining before a flood-controlled request can be repeated. Parse the JSON response and branch on ok rather than treating an HTTP response alone as proof that a message was delivered. ResponseParameters
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute- On a flood-control response, defer the job. If
parameters.retry_afteris present, schedule the next attempt no earlier than that many seconds later. - Coordinate the cooldown. Consider pausing other work in the affected rate-limit scope instead of letting every worker continue to generate more failures. The API documents the wait value but does not specify the complete scope of every rate-limit response.
- Separate flood control from network retries. Use a bounded retry policy for transient network problems; the specific
retry_aftervalue is Telegram’s instruction for flood control, not a universal retry policy for all errors. - Handle ambiguous delivery carefully. A connection can fail after Telegram has accepted a request but before the worker receives the response. The Bot API reference does not promise general idempotency for an application’s queue job, so blindly replaying that job can result in a duplicate message.
Telegram accepts HTTPS Bot API requests using GET or POST and supports JSON for ordinary requests; file uploads use multipart/form-data. Its PHP HelloBot page demonstrates a basic PHP request flow, but a production broadcast still needs its own durable queue and pacing logic. Telegram PHP HelloBot sample
“Grouping” an album is not broadcasting to a group of recipients
sendMediaGroup sends an album to one chat_id and returns an array of sent Message objects. It is not a multi-recipient broadcast method. Documents can only be grouped with documents, and audio with audio. sendMediaGroup
For a campaign containing an album, store the album payload once and enqueue a delivery for each destination chat. Each successful album send may return several message objects; retain their IDs if later edits or deletion depend on them. Do not assume that sending an album reduces the work of reaching multiple recipients: the method description covers an album in one chat, not fan-out across chats.
Rank #4
Choose free pacing or paid broadcasts
Telegram’s FAQ says paid broadcasts can reach up to 1,000 messages per second, with a charge of 0.1 Telegram Stars for each message above the free 30-per-second amount. It says the bot must have a balance of at least 100,000 Stars and at least 100,000 monthly active users to enable paid broadcasts; only successfully broadcast messages are charged. These are Telegram’s current published terms, not a delivery guarantee. Recheck the live FAQ and API reference before relying on the figures, since limits and eligibility can change. Telegram Bots FAQ Bot API send methods
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →| Approach | Rate and cost | What to weigh |
|---|---|---|
| Free paced delivery | Approximately 30 broadcast messages per second, according to Telegram’s FAQ; no paid-broadcast charge. | Choose it when the audience can be served over a longer window. Telegram gives 8–12 hours as an example for a free broadcast. |
| Paid broadcasts | Up to 1,000 messages per second; 0.1 Telegram Stars per message sent above the free 30-per-second amount. | Requires at least 100,000 Stars in the bot’s balance and 100,000 monthly active users, per the FAQ. Account for the Stars budget and what a partial campaign means for your service. |
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. Making requests Bot API changelog
Before selecting a rate, compare audience size, acceptable completion window, eligibility, and Stars budget. Preserve the same durable queue and failure tracking whichever pace you choose; a higher permitted rate does not remove the need to handle flood control and ambiguous failures.
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.

