Skip to main content
The Telegram API proxy at /tgapi/bot{TOKEN}/{method} transparently forwards all requests to api.telegram.org.

Usage

Replace the Telegram API base URL in your backend:

File downloads

A dedicated file download endpoint is available at /tgapi/file/bot{TOKEN}/{file_path}. This makes BotMux a drop-in replacement for Telegram’s file download URL, so you can configure it as your bot library’s base_file_url:
WebP files (stickers) are automatically converted to PNG. Content types are detected from file extensions, with sniffing as a fallback. Responses include a Cache-Control: public, max-age=86400 header.

Authentication

No additional auth required — the bot token in the URL is the authorization (same as Telegram API).

Message capture

For send methods, the proxy extracts the sent message from the Telegram response and saves it to the database.

Intercepted methods

Several Telegram Bot API methods are intercepted and handled by BotMux instead of being forwarded to Telegram: