Update Flow
Integration Modes
Polling Bots
If your bot currently usesgetUpdates, you have two options:
-
Long Polling mode (recommended, zero code changes) — enable “Long Poll” in bot settings, then point your backend’s API base URL to BotMux. Your bot keeps calling
getUpdatesas before, but gets updates from BotMux instead of Telegram. - Push mode — switch the backend to accept webhook-style HTTP POST requests. BotMux will poll Telegram and forward updates to your backend URL.
Webhook Bots
If your bot already uses webhooks — BotMux will switch it to polling and proxy updates back to the webhook endpoint. No changes needed on the backend side.Capturing Outgoing Messages
Telegram’sgetUpdates only returns incoming messages. To capture messages sent by the bot, point your backend at BotMux’s API proxy (/tgapi/) instead of api.telegram.org. The proxy forwards requests transparently and saves outgoing messages to the database.