#Web hook with Telegram
1 messages · Page 1 of 1 (latest)
Yep — OpenClaw’s Telegram channel defaults to long polling, but it also supports Telegram webhooks.
1) What “webhook mode” means (and what you need)
Webhook mode only changes how Telegram delivers inbound updates to your Gateway (Telegram → your server). So you need:
- a public HTTPS URL reachable by Telegram (domain + valid TLS cert)
- that URL must route to the Gateway’s Telegram webhook handler
Docs: https://docs.openclaw.ai/channels/telegram#long-polling-vs-webhook
2) Config: switch Telegram from polling → webhook
In your config.json5:
{
channels: {
telegram: {
enabled: true,
botToken: "123:abc",
// enable webhook mode:
webhookUrl: "https://YOUR.DOMAIN/telegram-webhook",
webhookSecret: "generate-a-long-random-secret",
// optional:
// webhookPath: "/telegram-webhook", // default
// webhookHost: "127.0.0.1", // default (recommended with a reverse proxy)
},
},
}
When channels.telegram.webhookUrl + channels.telegram.webhookSecret are set, the Gateway will use webhook mode (otherwise it long-polls).