Fix OpenClaw Telegram Webhook and sendChatAction Errors
Fix OpenClaw Telegram webhook conflicts, 409 errors, and sendChatAction failures. Covers polling vs webhook mode, deleting stale webhooks, and reverse proxy setup.
Key takeaways
- The
409 Conflict: terminated by other getUpdates requesterror means two processes are fighting over the same bot token. Delete the webhook and restart. - OpenClaw uses polling by default. If a previous installation left a webhook active, polling and the webhook conflict with each other.
- Run
curl "https://api.telegram.org/bot<TOKEN>/deleteWebhook"to clear any stale webhook before restarting. sendChatAction failedusually means the bot was removed from the chat or the chat ID changed. Check the chat ID in the error against your active pairings.
Your OpenClaw logs show 409 Conflict errors or sendChatAction failed messages. These are webhook and message delivery conflicts, usually caused by two processes trying to use the same bot token simultaneously or a stale webhook left behind by a previous installation.
Fixes when it breaks. Workflows when it doesn't.
OpenClaw guides, configs, and troubleshooting notes. Every two weeks.
OpenClaw Telegram 409 Conflict error
The full error looks like:
sendChatAction failed: 409 Conflict: terminated by other getUpdates request
This happens when Telegram receives two competing connections for the same bot token. Telegram only allows one active connection per bot, so it terminates one and throws 409 at the other.
Common causes:
- Polling and webhook both active. OpenClaw polls Telegram's API for new messages. If a webhook URL is also set, Telegram tries to deliver messages both ways, creating a conflict.
- Two OpenClaw instances running. You started a second gateway (maybe on a different server or in a different terminal) with the same bot token.
- Previous bot framework left a webhook. You migrated from another Telegram bot framework that set up a webhook. The webhook persists until you explicitly delete it.
Fix OpenClaw Telegram 409 Conflict
First, delete any existing webhook:
curl "https://api.telegram.org/bot<YOUR_TOKEN>/deleteWebhook"Replace <YOUR_TOKEN> with your actual bot token. You should get:
{"ok": true, "result": true, "description": "Webhook was deleted"}If it says the webhook was already deleted, that's fine. The important thing is that it's now confirmed cleared.
Then restart the gateway:
openclaw gateway restartCheck the logs:
openclaw logs --followThe 409 errors should stop. If they persist, another process is still using the bot token. Find and stop it:
# Check for other OpenClaw processes
ps aux | grep openclaw
# Check for other bot frameworks using the same token
ps aux | grep telegramKill any duplicate processes, then restart the gateway.
Verify OpenClaw Telegram webhook status
Check whether a webhook is currently set:
curl -s "https://api.telegram.org/bot<YOUR_TOKEN>/getWebhookInfo" | python3 -m json.toolThe response shows:
{
"ok": true,
"result": {
"url": "",
"has_custom_certificate": false,
"pending_update_count": 0
}
}If "url" is empty, no webhook is set and polling works normally. If "url" has a value, a webhook is active and needs to be deleted (unless you intentionally configured webhook mode).
Configure OpenClaw Telegram webhook mode intentionally
If you want to use webhooks instead of polling (for example, behind a reverse proxy for better performance), configure it in your OpenClaw config:
{
"channels": {
"telegram": {
"accounts": {
"default": {
"webhook": {
"url": "https://your-domain.com/telegram/webhook",
"port": 8443
}
}
}
}
}
}Webhook mode requires:
- A public HTTPS URL with a valid SSL certificate
- The webhook port (8443, 443, 80, or 88) accessible from the internet
- No other process polling the same bot token
After setting the config, restart the gateway. OpenClaw registers the webhook with Telegram automatically. Don't also run polling. They can't coexist.
Reverse proxy setup
If you run OpenClaw behind nginx or Caddy, proxy the webhook path to OpenClaw's webhook port:
location /telegram/webhook {
proxy_pass http://127.0.0.1:8443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}Make sure the url in your config matches the public-facing URL exactly, including the path.
Fix OpenClaw Telegram sendChatAction failed
The sendChatAction failed error means OpenClaw tried to show a "typing..." indicator in a chat but Telegram rejected the request. This is separate from the 409 conflict, though they can occur together.
Common causes:
Bot was removed from the chat. The bot tries to send a typing indicator to a group it was kicked from. The chat ID is still in the pairings but the bot is no longer a member.
Fix: Check if the bot is still in the group. If not, the pairing is stale. You can clean it up from ~/.openclaw/data/pairings.json or just ignore it. The error is cosmetic and doesn't affect other chats.
Chat ID changed. The group upgraded to a supergroup and the chat ID changed. The old pairing points to a dead ID. Check the logs for a new pairing request with the updated ID. See the group ID guide.
Webhook conflict. A 409 conflict can cause cascading failures including sendChatAction errors. Fix the webhook conflict first (see above), and the sendChatAction errors usually resolve on their own.
Rate limiting. If you see sendChatAction failures alongside 429 Too Many Requests, Telegram is throttling the bot. Wait 30 seconds and the limit resets.
FAQ
Is polling or webhook mode better for OpenClaw Telegram?
Polling is simpler and works everywhere without a public URL or SSL certificate. Webhook mode is slightly more efficient (no constant polling requests to Telegram's API) but requires HTTPS and a public domain. For most single-user OpenClaw setups, polling is fine. Use webhooks if you're already behind a reverse proxy and want lower latency.
I deleted the Telegram webhook but the OpenClaw 409 error came back after a restart. Why?
Another process is setting the webhook again. Check for cron jobs, systemd services, or Docker containers running a bot framework that auto-registers a webhook with Telegram on startup. Find and disable them. Only one process should use your bot token.
Can I run two OpenClaw Telegram bots on the same server?
Yes, as long as each bot has its own unique Telegram bot token. Two bots, two tokens, two separate OpenClaw configs. Two instances polling with the same token will always produce 409 Conflict errors.
Can I disable OpenClaw's Telegram typing indicator to stop sendChatAction errors?
OpenClaw sends typing indicators automatically while generating AI responses. There's no built-in toggle to disable it. Fix the underlying cause (stale pairing, removed bot, or changed chat ID) and the sendChatAction errors stop.
Changelog
- 2026-03-06: Created (split from fix-openclaw-telegram-errors)
Fixes when it breaks. Workflows when it doesn't.
OpenClaw guides, configs, and troubleshooting notes. Every two weeks.
