Home Tutorials Categories Skills About
ZH EN JA KO
Troubleshooting

OpenClaw Telegram Bot Unresponsive Troubleshooting Guide

· 11 min read

Problem Description

After configuring the Telegram channel, the OpenClaw Telegram bot fails to receive messages or reply to users. Common symptoms include:

The user sends a message to the bot in Telegram with absolutely no response, and the OpenClaw logs show no record of receiving any messages:

[openclaw:telegram] Bot started. Listening for messages...

The log shows a successful startup but no subsequent message processing records.

Or the logs show an error:

[openclaw:telegram] Error: 409 Conflict: terminated by other getUpdates request

Or alternatively:

[openclaw:telegram] GrammyError: Call to 'getMe' failed! (401: Unauthorized)

OpenClaw's Telegram channel is built on the grammY framework and communicates with Telegram servers through the Telegram Bot API.

Diagnostic Steps

Check Whether the Bot Token Is Valid

First, verify that the Bot Token used in your configuration is correct and valid:

curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getMe

A normal response should return the bot's basic information:

{
  "ok": true,
  "result": {
    "id": 123456789,
    "is_bot": true,
    "first_name": "MyBot",
    "username": "my_openclaw_bot"
  }
}

If it returns {"ok":false,"error_code":401,"description":"Unauthorized"}, the token is invalid.

Check for Webhook Conflicts

The Telegram Bot API provides two ways to receive messages: polling and webhook. If a webhook was previously set but OpenClaw is now using polling, the webhook's presence will prevent polling from receiving messages.

Check the current webhook status:

curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getWebhookInfo

If the url field is not empty, a webhook configuration exists.

Check OpenClaw Configuration

Review the Telegram channel configuration in ~/.openclaw/openclaw.json:

cat ~/.openclaw/openclaw.json | grep -A 10 telegram

Confirm that the botToken field exists and is not empty.

Solutions

Issue 1: Invalid or Expired Bot Token

If the token is invalid, you need to obtain a new one:

  1. Find @BotFather in Telegram
  2. Send /mybots to view your bot list
  3. Select the corresponding bot and click "API Token"
  4. If you need to reset the token, click "Revoke current token" to generate a new one

Update the new token in your configuration file:

{
  "channels": {
    "telegram": {
      "botToken": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
    }
  }
}

Then restart OpenClaw:

openclaw restart

Issue 2: Webhook Conflict (409 Error)

The 409 Conflict error typically indicates that another process is also calling getUpdates with the same Bot Token, or there is a leftover webhook configuration.

Clear the webhook:

curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/deleteWebhook

Make sure no other program is using the same Bot Token. Check for duplicate OpenClaw instances:

ps aux | grep openclaw

If multiple instances are found, stop the extra processes.

Issue 3: Bot Permissions Not Configured

If the bot cannot receive messages in a group, it may be because Group Privacy mode has not been disabled:

  1. Send /mybots in BotFather
  2. Select the bot > Bot Settings > Group Privacy
  3. Set Privacy mode to Disabled

This allows the bot to receive all messages in the group, not just messages starting with /.

Issue 4: grammY Framework Errors

If grammY-related exceptions appear in the logs, enable verbose logging for troubleshooting:

DEBUG=openclaw:telegram*,grammy* openclaw start

Common grammY errors and how to handle them:

  • ETELEGRAM: 429 Too Many Requests: Messages are being sent too frequently, triggering Telegram's rate limit. OpenClaw configures rate limiting by default, but if you've modified the configuration, check the rate limit settings.

  • EFATAL: Polling stopped: Polling stopped due to a fatal error. Check the full error stack trace — this is usually a network issue or invalid token.

  • Error: getaddrinfo ENOTFOUND api.telegram.org: DNS resolution failed. Check your network connection and DNS configuration.

Issue 5: Restricted Network Access

In some regions, the Telegram API may not be directly accessible. Configure a proxy:

{
  "channels": {
    "telegram": {
      "botToken": "YOUR_TOKEN",
      "proxy": {
        "url": "socks5://127.0.0.1:1080"
      }
    }
  }
}

OpenClaw's Telegram channel supports both HTTP and SOCKS5 proxies.

Verifying the Fix

After applying fixes, verify that the bot is working properly:

openclaw start

Then send a test message to the bot in Telegram and observe the OpenClaw log output for message receiving and processing records. The logs should show output similar to:

[openclaw:telegram] Received message from user 123456: "Hello"
[openclaw:gateway] Processing message for channel telegram, user 123456
[openclaw:telegram] Sent reply to user 123456

If everything is working correctly, the bot will reply to messages in Telegram.

OpenClaw is a free, open-source personal AI assistant that supports WhatsApp, Telegram, Discord, and many more platforms