solution channel medium linux macos windows telegram
Telegram: 'setMyCommands failed' / Bot API requests fail
Fix Telegram Bot API failures caused by outbound HTTPS/DNS/IPv6 issues to api.telegram.org (common on restricted VPS or proxies).
By CoClaw Team •
Error signatures: setMyCommands failed | sendMessage | sendChatAction | ENOTFOUND
Symptoms
- Logs show
setMyCommands failed. - Bot can’t send messages (
sendMessagefailures) or keeps timing out.
Cause
The gateway host cannot reliably reach Telegram Bot API (api.telegram.org) due to:
- outbound HTTPS blocked (firewall / corporate proxy)
- DNS resolution issues
- broken IPv6 egress (AAAA resolves first, but IPv6 routing is broken)
Fix
1) Run channel probes
openclaw channels status
openclaw channels status --probe
openclaw channels logs --channel telegram
2) Check DNS and IPv6
dig +short api.telegram.org A
dig +short api.telegram.org AAAA
If AAAA exists but your host has no working IPv6 egress:
- fix IPv6 routing, or
- prefer IPv4 at the OS layer (system-level setting), or
- disable IPv6 egress on the host if you know what you’re doing.
3) If you are behind a proxy
Ensure the host can make outbound HTTPS calls to api.telegram.org (and that DNS is not intercepted).
Verify
openclaw channels status --probereports Telegram healthy.- The bot can send a message and register commands successfully.
Related
- If the bot “sees mentions but not normal messages” in groups, that’s usually Telegram privacy mode / requireMention settings (separate troubleshooting article).