What we design around your workflow
A Telegram bot takes minutes to start: BotFather issues a token and the first reply works at once. Production bots fail on what a demo never meets: an update delivered twice, a broadcast that trips flood control, state lost in a redeploy, a leaked token, or a Mini App that trusts unverified data. We design those parts first and build features on top. This page covers what every Telegram bot shares; our store, support, alert, community, and lead pages cover each job.
Update intake
A webhook endpoint that checks Telegram's secret-token header, records each update_id, and hands slow work to a queue.
Conversation state
Per-user and per-chat state in your own database, so a restart or redeploy never loses a half-finished flow.
Paced sender
One outbound queue that keeps within Telegram's per-chat, per-group, and bulk limits and honors retry_after.
System integrations
Connectors to your CRM, store, help desk, or internal APIs, with their own credentials and timeouts.
Admin and monitoring
Admin-only commands or a web panel for settings, with alerts on errors, queue depth, and webhook failures.
Use only the Bot API features the job needs
Every bot draws on the same Bot API toolbox. Slash commands can differ by language and chat scope. Inline keyboards send callback queries, so a flow can update one message in place. Inline mode lets people call the bot from any chat by typing its username. Bots can also administer groups and channels, open Mini Apps that run web interfaces inside Telegram, sell digital goods for Telegram Stars, and answer chats for a connected Telegram Business account. The smallest set that serves the job is the easiest to use and maintain.
Buttons before Mini Apps
Commands and inline keyboards cover most journeys; a Mini App suits search, tables, or long forms.
Verified Mini App data
The server verifies each launch's HMAC-SHA-256 hash with a key derived from the bot token, and never trusts initDataUnsafe.
Payments by product type
Digital goods sell for Stars with a /paysupport command; physical goods can use a payment provider.
Primary sources
- Telegram: Mini AppsHow Mini Apps launch and how a server validates their initData.
- Telegram: Bot payments in StarsDigital goods and services are paid exclusively in Stars, and bots must answer /paysupport.
Receive updates by webhook, then process them in a queue
Updates arrive in one of two mutually exclusive ways: the bot calls getUpdates in a loop, known as long polling, or Telegram pushes each update to an HTTPS webhook. Polling suits development; webhooks suit production. Telegram delivers webhooks to ports 443, 80, 88, or 8443, sends your secret token in the X-Telegram-Bot-Api-Secret-Token header, and retries failed requests. Updates nobody collects are discarded after 24 hours. The endpoint acknowledges at once and leaves the work to a queue, so a slow CRM call never delays the next message.
Reject unsigned requests
Drop any webhook call whose secret-token header does not match the value you set.
Process each update once
Record update_id values so a repeated delivery cannot create a second order or ticket.
A local server for big files
Hosted limits are 50 MB up and 20 MB down; a self-hosted Bot API server allows 2000 MB uploads and unlimited downloads.
Primary sources
- Telegram Bot APIgetUpdates, setWebhook and secret_token, update_id, file limits, and the local Bot API server.
Pace outbound messages and respect who may be messaged
Telegram's guidance is about one message a second within a chat and 20 a minute in a group, with bulk notifications topping out near 30 a second. Requests over the limit fail with a retry_after value, the seconds to wait before trying again. Reach has its own rule: a bot cannot start a conversation, so it writes only to people who messaged it first or groups that added it. One outbound queue spreads broadcasts out, sends urgent messages first, and stops writing to people who blocked the bot.
Wait when told
Pause for the full retry_after period before sending to that chat again.
Notice blocks
A my_chat_member update reports blocks and unblocks, so sends stop and resume with them.
Paid broadcasts at large scale
Bots that meet Telegram's thresholds for active users and Stars balance can enable paid broadcasts of up to 1000 messages a second.
Primary sources
- Telegram Bots FAQSending rates per chat, per group, and for bulk notifications, and the terms of paid broadcasts.
- Telegram: Bots, an introduction for developersBots cannot start conversations; a user must message the bot or add it to a group first.
Treat the token and the launch as production work
Whoever holds the bot token controls the bot, so it lives in a secret store, never in code, chat history, or shared documents, and BotFather issues a replacement if it leaks. We set up separate development and production bots with their own tokens, webhooks, and data, so tests never reach real users. Admin commands check the sender's user ID against an allow list, and logs keep what debugging needs rather than whole conversations. Launch adds alerts on errors and webhook health, plus a runbook for deploys and token rotation.
Registered to your organization
Create the bot from a Telegram account your organization controls, so the username and token never depend on a contractor.
Rotate on suspicion
Issue a new token in BotFather as soon as one may have leaked, then redeploy.
A written runbook
Document deploys, rollbacks, token rotation, and webhook resets so any engineer on your side can operate the bot.
Primary sources
- Telegram: Bot featuresKeep the token secure, since anyone holding it can control the bot, and generate a new one if it is compromised.
Realistic limits and operator controls
Telegram keeps little for you
Uncollected updates expire and older messages may be removed, so keep every record you need in your own database.
Audience comes first
A bot reaches only people who start it or groups that add it, so growth depends on your links, channels, and marketing.
The platform moves often
Telegram shipped four Bot API versions between May and August 2026; someone must track the changelog and update libraries.
Frequently asked questions
Can you work on a bot we already have?
Yes. We review the code, hosting, token storage, and data, then extend the bot or rebuild it behind the same username and switch the webhook when the new version is ready.
Do we need our own server?
Yes, somewhere to run the code: a cloud server, container platform, or serverless function. Webhooks need a public HTTPS address; long polling needs only outbound access.
Can the bot message anyone on Telegram?
No. It can write to people who started it and to chats where it was added, and anyone can block it. We do not build tools that message strangers or work around that rule.
Which languages and libraries do you use?
We choose a maintained Bot API library in a language your team can support after launch; Python and TypeScript both have mature options.
