Telegram · 429
Telegram 429: Too Many Requests
Telegram limits how fast a bot may send. The number after "retry after" is how many seconds it wants you to wait. Respect it, then slow down.
What you are seeing
Bot API
Too Many Requests: retry after 35The limits
Telegram's own guidance is roughly one message a second in any single chat, no more than 20 messages a minute in a group, and around 30 messages a second across all chats. It does not publish exact figures and adjusts them, so treat these as the pace to stay under rather than a target.
A bot that answers people as they talk to it rarely comes near them. The bots that hit 429 are the ones that send in bulk: broadcasts, reminders to every subscriber at once, or a loop that edits a message on every tick.
Wait, then pace
The error includes retry_after, in seconds. Sending again sooner only extends it. Both big libraries have a ready-made way to respect it automatically, and a broadcast should additionally be spread out rather than fired all at once.
grammY
const { autoRetry } = require('@grammyjs/auto-retry');
// Waits out retry_after and repeats the call, instead of throwing.
bot.api.config.use(autoRetry());python-telegram-bot
# pip install "python-telegram-bot[rate-limiter]" from telegram.ext import AIORateLimiter, ApplicationBuilder application = ApplicationBuilder().token(token).rate_limiter(AIORateLimiter()).build()
FAQ
Questions
How long should a broadcast take?
At about 25 messages a second, a broadcast to 3,000 users takes around two minutes. That is the right trade: a broadcast that finishes in two minutes beats one that is cut off by a 429 halfway through.