Haven't installed OpenClaw yet? Click here for one-line install commands
curl -fsSL https://openclaw.ai/install.sh | bash
iwr -useb https://openclaw.ai/install.ps1 | iex
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Worried about affecting your computer? ClawTank runs in the cloud with no installation required, eliminating the risk of accidental deletions
Key Findings
  • Telegram is one of OpenClaw's most popular messaging channels, allowing users to issue commands to AI agents, receive reports, and control their computers from their phone anytime, anywhere[1]
  • The integration process involves three steps: (1) Create a Telegram Bot via BotFather, (2) Write the Bot Token into OpenClaw's configuration, (3) Complete the Pairing verification[2]
  • The Pairing mechanism is the security core of OpenClaw — only Telegram accounts that have completed pairing verification can control your agent, preventing others from accessing your computer through your Bot[5]
  • DM Policy and group settings let you precisely control who can interact with the agent and in what contexts, preventing unauthorized access[1]

1. Why Choose Telegram?

OpenClaw supports multiple messaging channels, including WhatsApp, Discord, LINE, and Slack. So why is Telegram the top choice for many users?

2. Step-by-Step Setup Tutorial

Step 1: Create a Telegram Bot

In Telegram, search for @BotFather (Telegram's official Bot management tool) and send the following message:[3]

/newbot

BotFather will ask you in sequence:

  1. Bot name (display name): e.g., "My AI Agent"
  2. Bot username (unique identifier, must end with bot): e.g., "my_openclaw_agent_bot"

Once complete, BotFather will reply with a Bot Token in a format like:

7123456789:AAHx1234567890abcdefghijklmnopqrstuv

Keep this Token safe — anyone who has it can control your Bot.

Step 2: Write the Bot Token to OpenClaw

Return to your terminal and run the following command to save the Token to OpenClaw's configuration:[1]

openclaw config set channels.telegram.botToken "YOUR_BOT_TOKEN"

Then restart the Gateway for the settings to take effect:

openclaw gateway restart

Step 3: Pairing Verification

At this point, your Bot is live on Telegram, but it cannot yet control the agent. You need to complete Pairing — OpenClaw's security mechanism that ensures only you can control the agent.[2]

  1. Send any message to your Bot in Telegram
  2. The Bot will reply with "Pairing Required" and display a pairing code
  3. In your terminal, run:
# View pending pairing requests
openclaw pairing list

# Approve pairing
openclaw pairing approve

Once pairing is complete, you can chat normally with the AI agent in Telegram.

3. DM Policies and Group Management

3.1 DM Policy

OpenClaw provides fine-grained access control to determine who can interact with the agent via direct messages:[1]

openclaw config set channels.telegram.dmPolicy "owner_only"

3.2 Group Settings

You can add the Bot to a Telegram group so that team members can share the AI agent. Access control within the group is managed via groupPolicy:

openclaw config set channels.telegram.groupPolicy "allowlist"

Security note: In group mode, every action the agent takes can affect your entire computer. Make sure all group members are trusted individuals.[5]

4. Common Use Cases

4.1 Remote Development

Away from your desk but need to modify code on the server? Send a command to the agent via Telegram:

"Change the API_URL in config.js from staging to production, then run the deployment script"

The agent will make the changes on your server, run the deployment, and report the results back to Telegram.

4.2 Scheduled Reports

Combined with OpenClaw's Cron functionality, set the agent to send a system status report via Telegram every morning:

"Every day at 9 AM, check the server's CPU, memory, and disk usage, and send a summary to Telegram"

4.3 File Processing

Send files directly to the agent in Telegram for processing — for example, drop a CSV file and ask the agent to analyze the data and generate charts.[6]

5. Troubleshooting

ProblemCauseSolution
Bot has no response at allGateway is not running or Bot Token is incorrectConfirm the Gateway is running (openclaw gateway status); verify the Token is correct
"Pairing Required" keeps appearingPairing was not completed or has expiredRun openclaw pairing approve again
Bot does not respond in groupBot is not set as a group admin or groupPolicy restricts accessSet the Bot as a group administrator; check groupPolicy settings
Message delay exceeds 30 secondsSlow LLM response or network latencySwitch to a faster model (Haiku); check the Gateway server's network
Chinese replies show garbled charactersModel is not configured for Chinese preferenceAdd language preference settings in the agent's System Prompt

6. Security Best Practices

Controlling an AI agent via Telegram essentially extends your computer's control authority over the network. The following security principles must be observed:[5][8]

  1. Always use owner_only or allowlist: Unless you have a clear reason, never set the DM Policy to anyone
  2. Regularly check paired devices: Use openclaw pairing list to view all paired devices and remove those no longer in use
  3. Do not use in public groups: Only interact with the agent in private groups or direct messages
  4. Rotate Bot Tokens: If you suspect the Token has been compromised, immediately regenerate it in BotFather (/revoke) and update the OpenClaw configuration
  5. Limit agent Skill permissions: If the agent only needs to query data, do not install Skills with file modification permissions

Conclusion

The Telegram and OpenClaw integration turns the AI agent into your true "remote assistant" — no need to open your computer; a single Telegram message lets AI complete tasks for you.[6] The entire setup process takes just three steps and less than ten minutes.

If you haven't installed OpenClaw yet, we recommend reading the Architecture Deep Dive and Deployment Guide to complete the basic setup first. To learn about configuring other channels like WhatsApp and Discord, check out the Messaging Integration Guide.