← Articles
Telegram Bot API: HTTPS, getUpdates, and webhooks logo
telegram

Telegram Bot API: HTTPS, getUpdates, and webhooks

· SEP 19, 2026 ·
Read
Share

BotFather issues the token. Local Bot API server lifts file limits. Keep the trading-bot cost piece.

devrels.xyz/a/325

The Telegram Bot API is an HTTPS interface for bots. Create the bot with @BotFather, then call methods on https://api.telegram.org/bot<token>/METHOD_NAME. Live changelog on the same page is Bot API 10.3 (24 August 2026). Follow @BotNews.

This is the HTTP bot surface, not the MTProto client API at core.telegram.org/api. The trading-bot cost piece stays: Telegram trading bot, real cost.

Making requests

HTTPS only. GET and POST. Parameters via query string, application/x-www-form-urlencoded, application/json (not for file uploads), or multipart/form-data (files). Methods are case-insensitive. Queries are UTF-8.

bash
curl https://api.telegram.org/bot$TOKEN/getMe

Every response is JSON with boolean ok. Success puts the payload in result. Failure sets ok false, plus description and an integer error_code (the code may change). Some errors include parameters of type ResponseParameters.

Getting updates

Two mutually exclusive paths: getUpdates (long poll) or webhooks. You cannot long-poll while an outgoing webhook is set. Incoming updates sit on Telegram's servers until the bot takes them, and they are not kept longer than 24 hours. You receive JSON Update objects either way. Confirm long-poll updates with offset = last update_id + 1.

If you already answer a webhook, you can invoke a Bot API method in that HTTP response: set method and pass parameters as JSON, form-urlencoded, or multipart. You will not get that call's result.

Local Bot API server

Source: tdlib/telegram-bot-api. Point requests at your host instead of api.telegram.org. Then: download files with no size limit, upload up to 2000 MB, upload via local path / file URI, HTTP webhook URLs, any local IP, any port, max_webhook_connections up to 100000, and file_path as an absolute local path after getFile. Cloud getFile is 20 MB (FAQ).

10.3 in short

Rich messages gained buttons, expandable quotations, and documents. Ephemeral messages (visible to one user plus the bot) moved onto ephemeral_message_parameters. Disabled inline buttons. Drafts can stop. Not a replacement for the full changelog.

Resources

Keep reading

Get new articles in your inbox

Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.

Telegram Bot API: HTTPS, getUpdates, and webhooks | devrels.xyz