Telegram Bot API in 2026: Tokens, Limits and Channel Posting
Telegram Bot API guide for 2026: get a BotFather token, post to a channel, file size and rate limits, why bots can't schedule, and fixes for posting errors.
The Telegram Bot API is Telegram's free HTTPS API for bots. Create a bot with @BotFather to get a token, add it as a channel admin with the post right, then call sendMessage or sendPhoto. Limits: 4,096-character messages, 20 MB for files sent by URL, about one message per second per chat. Bots cannot schedule posts.
The Telegram Bot API is Telegram’s free HTTP interface for bots. You create a bot with @BotFather, get a token, and call https://api.telegram.org/bot<token>/METHOD_NAME. To post in a channel, add the bot as an administrator with the right to post messages, then call sendMessage, sendPhoto or sendMediaGroup with the channel as chat_id. There is no app review and no fee for normal use.
The catch is in the details: which ID the channel needs, what the file size limits are when you send media by URL, how fast you can send before Telegram returns 429, and the fact that bots can’t schedule messages at all. This guide covers each of those for 2026. If you’re comparing Telegram with other networks, the list of social platforms with a public posting API puts all twelve side by side.
PostGate handles OAuth, publishing and delivery evidence for every network through one API. Start free or read the docs.
What is the Telegram Bot API?
Telegram has two developer APIs, and search results mix them up all the time:
| Bot API | Telegram API (MTProto) | |
|---|---|---|
| Who it acts as | A bot account | A real user account (a custom client) |
| How you call it | Plain HTTPS requests with a bot token | The MTProto protocol, usually through TDLib or a client library |
| Setup | One chat with @BotFather | An api_id and api_hash, plus a phone login |
| Typical use | Channel posts, notifications, chatbots | Building a full Telegram app |
For publishing to a channel or group, the Bot API is the one you want. The official reference is a single long page, and its “Recent changes” section shows the current version: Bot API 10.5, released on November 22, 2026.
Requests go over HTTPS with GET or POST. Parameters can be sent as a query string, form data, JSON or multipart (use multipart when you upload a file). Every response is JSON with a boolean ok. When ok is true the payload is in result; when it is false, description explains the problem and error_code carries the HTTP-style code.
How do you get a Telegram Bot API token?
Telegram’s bot guide describes the whole flow through @BotFather:
- Open a chat with @BotFather and send
/newbot. - Pick a display name, then a username. The username must end in “bot”, like
tetris_botorTetrisBot. - BotFather replies with the token, a string shaped like
110201543:AAHdqTcvCH1vGWJxfSe.... - Test it with
getMe:
curl https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getMe
If you get "ok": true and your bot’s username back, the token works. If the token leaks, send /token to BotFather to generate a new one that replaces it. Because the token sits in the request URL, keep it out of access logs and error trackers that record full URLs.
How do you post to a Telegram channel with the Bot API?
1. Make the bot an admin. Add it to the channel as an administrator with “Post messages” turned on (the can_post_messages right in the API). A bot that is only a member, or not in the channel at all, can’t post there.
2. Find the chat ID. A public channel can be addressed by its username, like @yourchannel. A private channel has no username, so you need its numeric ID, a negative number such as -1001234567890. An easy way to read it: post something in the channel after the bot is an admin, then call getUpdates and look for the channel_post update and its chat.id. Note that getUpdates doesn’t work while a webhook is set.
3. Send the post. Text goes through sendMessage:
curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "@yourchannel",
"text": "New post is live: https://example.com/launch",
"link_preview_options": { "is_disabled": false }
}'
A single image uses sendPhoto with a photo (a URL, a file_id or an upload) and an optional caption. Videos use sendVideo, and Telegram clients only play MPEG4 inline; other formats can be sent as a document. For an album, sendMediaGroup takes 2 to 10 items, and the caption goes on the first one so it shows under the album.
The response includes the message_id. For a public channel, the post’s link is https://t.me/<channel username>/<message_id>, which is handy as proof that the post went out.
What are the Telegram Bot API limits?
Content limits, from the Bot API reference:
| Limit | Value |
|---|---|
| Message text | 1 to 4,096 characters after entity parsing |
| Photo or video caption | 0 to 1,024 characters |
Album (sendMediaGroup) |
2 to 10 items |
| Photo sent by URL | 5 MB |
| Other files sent by URL | 20 MB |
| Photo uploaded with multipart | 10 MB |
| Other files uploaded with multipart | 50 MB |
File download (getFile) |
20 MB |
| Upload through a self-hosted Bot API server | 2,000 MB |
The URL rows trip people up. When you pass a link, Telegram downloads the file itself, and the ceiling for a non-photo file is 20 MB, not 50. If your videos are larger, upload them with multipart or run the open-source local Bot API server, which raises uploads to 2,000 MB.
Rate limits, from the Bot FAQ:
- In a single chat, avoid more than one message per second. Short bursts are tolerated, then you get 429 errors.
- In a group, a bot can’t send more than 20 messages per minute.
- For bulk notifications across many users, the free ceiling is about 30 messages per second.
- Paid broadcasts raise that to 1,000 messages per second at 0.1 Telegram Stars for each message above the free 30. Telegram only enables them for bots with at least 100,000 Stars on balance and 100,000 monthly active users.
When you hit a limit, the error response includes parameters.retry_after, the number of seconds to wait. Read it and wait exactly that long instead of retrying on a fixed timer. The same pattern applies across networks, which the social media API rate limits reference lays out per platform.
Can the Telegram Bot API schedule posts?
No. sendMessage and the other send methods have no publish-time parameter, so a bot sends the moment you call it. Scheduling exists in Telegram, just not for bots: people can hold the Send button in the app and pick “Schedule Message” (Telegram announced it in 2019), and the user-level MTProto method messages.sendMessage accepts a schedule_date. Neither helps a bot.
So a scheduled Telegram post is your own job: store the post and its time, run a worker that calls the send method at that time, honor retry_after on 429, and make the call idempotent so a retry after a timeout doesn’t post the same message twice. If you plan to run that queue yourself, BullMQ vs RabbitMQ compares two common choices for delayed jobs.
Why does my Telegram bot fail to post?
Most failures come down to a short list. Check the description in the response, then go through these:
- The bot isn’t an admin of the channel, or it is an admin without the post right.
- Wrong chat ID: a private channel addressed by a username it doesn’t have, or a numeric ID copied without the minus sign.
- Media too large for the method you used: a 30 MB video passed by URL fails even though the same file uploads fine with multipart.
- Unsupported video container: anything other than MP4 may arrive as a file instead of a playable video.
- Caption too long: over 1,024 characters on a photo or video. Send the text as a separate message or shorten it.
- Flood control: too many messages in one chat or group. Wait for
retry_after. getUpdatesreturns an error: a webhook is set. CalldeleteWebhookfirst or read updates through the webhook.
Posting to Telegram from one API with the other networks
The Telegram part is simple compared with networks that need app review, like the TikTok API with its audit. Telegram is closer to the Bluesky API: a credential and you post. What adds work is everything around it once Telegram is one of several channels: a scheduler, retries, per-network limits and a record of what actually went out.
PostGate treats Telegram as one more destination. Your customer pastes the bot token and destination chat on a hosted connection page, and you publish with the same post request you use for Instagram, LinkedIn or X: text up to 4,096 characters, up to 10 images or videos, scheduled for later if you want, with delivery status per destination. The same flow works without code in the dashboard, from an AI agent over MCP, or through the REST API. PostGate doesn’t pull Telegram analytics or comments, and the Telegram rules still apply: the bot has to be an admin of the channel.
Frequently asked questions
Is the Telegram Bot API free?
Yes. Bots can send messages at no cost within the default limits, and there is no paid tier for the API itself. The only paid option is paid broadcasts, which charge Telegram Stars for bulk sends above 30 messages per second.
Can a Telegram bot post to a channel without being an admin?
No. The bot has to be added as an administrator of the channel with the right to post messages. Without it, every send call to that channel fails.
What is the maximum message length in the Telegram Bot API?
A text message can have up to 4,096 characters after formatting entities are parsed. Captions on photos and videos are limited to 1,024 characters.
Is the Telegram Bot API the same as the Telegram API?
No. The Bot API is an HTTPS interface for bot accounts with a BotFather token. The Telegram API (MTProto) is the protocol for building full user clients and logs in as a real user with an api_id, api_hash and phone number.
