October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Handle Telegram Bot API Rate Limits and 429 Errors in PHP

A practical PHP approach to Telegram Bot API 429s: coordinate sends through a shared limiter, honor any supplied retry delay, and keep retries bounded.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To handle a Telegram Bot API HTTP 429 in PHP, stop sending the affected work immediately, read the response, and delay its retry. If Telegram provides a retry delay, wait at least that long; otherwise use a conservative, bounded backoff. Route outgoing messages through a shared queue or rate limiter so concurrent PHP workers do not collectively exceed Telegram’s guidance.

What Telegram’s rate guidance means

Telegram’s Bots FAQ gives operational guidance, not a per-request quota that guarantees success below a specific number. It says to avoid sending more than one message per second in a single chat, limits bots in groups to 20 messages per minute, and puts free bulk notifications at about 30 messages per second. Telegram notes that short bursts may work but can eventually result in 429 errors.

For bulk notifications that do not use paid broadcasts, Telegram suggests spreading delivery over longer intervals, giving 8–12 hours as an example. Plan the schedule around the full workload: separate workers that each follow a nominal limit can still exceed it when their combined traffic targets the same chat or sends a large broadcast.

How to handle a 429 response in PHP

The pattern below is engineering guidance, not a retry algorithm or PHP library prescribed by Telegram. Telegram’s Bot API reference describes HTTP Bot API calls and their result format. Inspect the actual response rather than assuming every error has identical fields.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Pause the affected send. Do not immediately resend a request that returned HTTP 429.
  2. Inspect the status and body. Decode the Bot API response and look for a retry delay. Validate the current response format in Telegram’s API reference; do not treat an unparseable or absent delay as permission to retry immediately.
  3. Schedule a delayed retry. If the response includes a retry delay, wait at least that long before retrying the affected work. If there is no usable delay, apply a conservative backoff.
  4. Cap retries. Set a maximum attempt count or a maximum time window. When that bound is reached, stop retrying automatically and mark the send as failed or needing review.
  5. Record the outcome safely. Log the Bot API method, relevant chat scope, HTTP status, retry delay, attempt count and final outcome. Never include the bot token in logs.

Telegram’s official PHP Hello Bot sample is useful for basic Bot API syntax and integration. It is not documented as a 429 retry package.

Coordinate rate limits across workers

Put outgoing calls behind a shared queue or rate limiter, especially if web requests, scheduled jobs, or multiple queue workers can send messages at once. Track scheduling at both relevant levels: per chat, and across the overall bulk workload. A limiter held only in one PHP process cannot coordinate other processes; use shared scheduling state when workers run concurrently.

  • Schedule messages to a single chat no faster than Telegram’s one-message-per-second guidance.
  • For groups, keep sends within Telegram’s guidance of 20 messages per minute.
  • For free bulk delivery, throttle the combined outbound workload to about 30 messages per second or slower, and spread large jobs over a longer interval.

These controls reduce avoidable 429s but do not guarantee that every request will succeed: Telegram explicitly warns that bursts can lead to later limits.

When paid broadcasts may fit

For qualifying high-volume bots, Telegram documents paid broadcasts of up to 1,000 messages per second. Messages above the free 30-per-second amount cost 0.1 Telegram Stars each. Telegram’s FAQ says eligibility includes at least 100,000 Stars in the bot balance and 100,000 monthly active users; check current eligibility in @BotFather. See the FAQ’s bulk messaging guidance and the Bot API paid broadcasts documentation before designing around this option.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Paid broadcasts address throughput for eligible workloads; they do not remove the need to handle failed calls, coordinate sends, or bound retries. Telegram describes bots as code running on a developer’s server, so a PHP-capable host is a deployment requirement, not a rate-limit fix. See Telegram’s Bots overview.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Do not confuse Bot API HTTP 429 with MTProto flood waits

This article concerns HTTP requests to the Bot API. Telegram’s separate MTProto API errors page describes errors such as FLOOD_WAIT_X under code 420. That is a different API surface and response context; do not assume its error format is the handling rule for an HTTP Bot API 429.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.