Table of contents

Telegram API: features, rate limits and how to use them (2026)

Last updated
Duration
telegram-api

TL; DR: Quick Summary

  • The Telegram API is really three APIs, and the Bot API is the one to use for customer messaging and automation.
  • Telegram's Bot FAQ advises about 30 bulk messages a second, and bots that go over start getting HTTP 429 errors.
  • Webhooks push each update to your server as it happens, so they suit production bots better than long polling.
  • Create the bot in @BotFather, keep its token in a secret manager, and revoke it there if it leaks.
  • Teams that want Telegram chats in a shared inbox can connect the bot token to SleekFlow instead of building one.

If a customer asks whether they can message you on Telegram, the answer starts with the Telegram API, and that phrase covers more than one thing. Telegram offers a Bot API for bots, a lower-level API for building full apps, and a Gateway API for verification codes.

What is the Telegram API?

The Telegram API is a set of interfaces for building on Telegram, and it isn't one product. The Bot API is an HTTPS interface for bots, the core API is for building your own Telegram apps, and the Gateway API sends verification codes through Telegram instead of SMS. A business automating customer messages needs only the Bot API.

What types of API does Telegram offer?

Telegram offers three interfaces, and only one fits most businesses. For support, marketing or sales automation, start with the Bot API because it needs no custom client, and use the core API only to build your own Telegram app.

  • Bot API. An HTTPS interface for bots that send messages, handle commands, answer inline queries and automate replies.
  • Core API and TDLib. The lower-level route for building your own Telegram client. TDLib handles encryption, networking and local data storage on Android, iOS, Windows, macOS, Linux and most other systems.
  • Gateway API. Delivers authorization codes through Telegram instead of SMS. Telegram lists the per-code price on its Gateway page, so check it there before you plan volume.

How does the Bot API work?

A Telegram bot is an account your code controls through the Bot API, and it doesn't need a phone number. Every request carries a bot token in the URL, and every method returns JSON over HTTPS.

A first request looks like this:

It returns basic information about the bot as JSON.

How do you get and secure a Telegram bot token?

To get a bot token, message @BotFather and send the /newbot command. The token is your bot's password, so store it in a secret manager and never put it in public code.

  1. Open the Telegram app and search for @BotFather.
  2. Start a chat and run the /newbot command.
  3. Set a display name for your bot.
  4. Choose a unique username that ends in bot, for example .
  5. Copy the API token @BotFather sends back and keep it private.

If you think the token has leaked, revoke it through @BotFather right away.

How do you send and receive messages with the Bot API?

A user messages your bot, and Telegram passes that update to your server. Your code reads updates with getUpdates or a webhook and answers with sendMessage. A bot can't start a conversation, so the user has to message it first.

How do getUpdates and sendMessage work?

Use getUpdates to read incoming messages, which carry the chat ID and the text. Use sendMessage with that chat ID and your text, plus an optional parse mode such as Markdown or HTML. A message is limited to 4,096 characters, so split longer replies into several messages.

A bare-bones Python example of a send request:

Long polling or webhooks: which should you use?

Telegram gives you two ways to receive updates, and you can use only one at a time. Long polling is simple and suits development. Webhooks push each update to your HTTPS endpoint as it happens, which suits production bots.

  • Long polling. Your bot calls repeatedly with a timeout. It's simple and works well in development, but it lags behind real time.
  • Webhooks. You register an HTTPS URL with , and Telegram sends every update to your endpoint. You need a public server with a valid TLS certificate, though a self-signed certificate works if you upload its public key with the parameter.

Telegram allows webhooks only on the allowed webhook ports, which are 443, 80, 88 and 8443. won't work while a webhook is set, so call first to switch back to polling.

What can a Telegram bot do?

Telegram bots can answer inline queries, show buttons that send data back, take payments through third-party payment providers, and host Mini Apps. Telegram doesn't process the payments itself, so your payment provider handles card details.

  • Inline queries. Users type @yourbot and a keyword in any chat, and your bot sends back results they can drop into the conversation.
  • Inline buttons and callback queries. Buttons under messages send data back through a callback, which suits menus, quick replies and support triage.
  • Payments. Bots can send invoices and track payment status. Your bot has to answer the within 10 seconds, or the transaction is canceled.

What are the Telegram Bot API rate limits?

As of October 2026, Telegram's Bot FAQ advises about one message a second in a single chat, no more than 20 messages a minute in a group, and about 30 messages a second for bulk notifications. Go past them and your bot starts getting HTTP 429 errors. Paid broadcasts raise the bulk limit.

When a request hits flood control, the error can carry a value in its field, which is the number of seconds to wait before you try again.

How do paid broadcasts work?

Paid broadcasts raise a bot's limit from the free 30 messages a second to a maximum of 1,000. Telegram charges 0.1 Stars for each message above the free amount. A bot needs at least 100,000 Stars on its balance and at least 100,000 monthly active users, and it's charged only for messages sent successfully.

Should you build with code or use a platform?

Build with code when you need deep CRM integration, custom logic or Bot API features a platform doesn't pass through. Use a platform when speed, a shared inbox and easy management matter most. A platform such as SleekFlow connects through your bot token, so you don't write the HTTP calls.

On the no-code path, you create a bot through @BotFather, connect its token to SleekFlow and manage the conversations in one inbox.

Platforms support a subset of the Bot API. Check out our Help Center article on the Telegram channel overview for more info, because it lists commands, menu buttons and polls as not supported.

How does SleekFlow work with a Telegram bot?

SleekFlow connects a Telegram bot to its inbox through the bot token, so your team can reply to Telegram customers next to your other channels without writing API calls. An admin adds the token under Channels, and one account can connect more than one bot.

Customers start a chat from the bot link or the QR code in the channel settings, because a bot can't message someone first. After that, the Help Center says replies have no time limit, and your team can send text, documents, images, videos, voice notes, payment links and product messages from the SleekFlow catalog.

For marketing and announcements, you can set up a Telegram channel as a broadcast channel. The Broadcasts FAQ adds that Telegram broadcasts show no Read status in reports.

How Legacy Artisan put its customer chats in one inbox

Legacy Artisan, a Hong Kong luxury watch retailer, struggled to keep up with customer conversations scattered across platforms. SleekFlow brought WhatsApp, Instagram, Facebook, WeChat, LINE and Telegram into one platform, so its team of more than 10 timepiece specialists could see every conversation in one view.

By Q3 2024, the story reports new customer inquiries up 52.3% from the previous quarter and a 68.4% rise in qualified leads, meaning inquiries that became in-depth discussions about specific timepieces.

Read the Legacy Artisan case study for the full results.

How do you get started building a Telegram bot?

Start with the Bot API. Create a bot in @BotFather, test the token with , and choose between polling and webhooks. If you'd rather not build the plumbing, connect your bot to SleekFlow and manage the conversations from one inbox.

Frequently asked questions

How do I get an api_id and api_hash from Telegram?

Sign up for Telegram in an official app, log in at my.telegram.org, open "API development tools" and fill out the form. Telegram then shows your api_id and api_hash. You need them only to build your own Telegram app on the core API. A bot built on the Bot API needs just the token from @BotFather, so most businesses can skip this step.

Is the Telegram Bot API free for business use?

Within its default limits, yes. The Bot FAQ says bots can message their users at no cost. Paid broadcasts charge 0.1 Stars per message above the free 30 a second, and the Gateway API charges per delivered verification code at the rate on Telegram's Gateway page. SleekFlow's Help Center says it adds no messaging fees on Telegram, though your plan has its own price.

Can I use one Telegram bot for both support and marketing?

Yes. One bot can cover support, marketing and order updates. Split the experience with commands or buttons such as "Support," "Orders" and "Offers," and we suggest sending promotions only to people who've opted in. Marketing consent rules differ by market, so check yours with local counsel.

Is Telegram secure enough for sensitive customer conversations?

Telegram encrypts the connection between its apps and its servers, and secret chats add end-to-end encryption. A bot can read the messages sent to it, so don't ask for card numbers in a bot chat. For payments, use Telegram's payments flow, where your payment provider handles card details. For regulated data, check the rules in your market with local counsel.

Supercharge conversions with SLEEKFLOW AI

Try it now at zero cost!