Openclaw Telegram Setup
Configure a Telegram Bot with OpenClaw in 10 minutes to enable free, worldwide AI messaging with command, group, and webhook support.
OpenClaw Telegram Setup
10 分钟配置 Telegram Bot 作为 OpenClaw 消息渠道。
为什么选 Telegram?
- 免费无限制:消息、文件、多媒体全免费
- API 开放:Bot API 简单易用
- 全球可用:无地域限制
- 功能强大:支持命令、按钮、Inline 查询
快速配置
Step 1: 创建 Bot
- 在 Telegram 搜索
@BotFather - 发送
/newbot - 按提示设置 Bot 名称
- 保存返回的 Token(格式:
123456789:ABCdefGHI...)
Step 2: 获取 Chat ID
# 方法 1:用你的 Bot 发条消息,然后访问
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
# 方法 2:用 @userinfobot 获取你的 ID
Step 3: 配置 OpenClaw
编辑 ~/.openclaw/config.yaml:
plugins:
entries:
- plugin: openclaw-telegram
config:
botToken: "123456789:ABCdefGHI..."
allowedChatIds:
- 123456789 # 你的 Chat ID
Step 4: 启动 Gateway
openclaw gateway start
Step 5: 测试
在 Telegram 向你的 Bot 发送消息,应该收到 AI 回复。
高级功能
群组支持
plugins:
entries:
- plugin: openclaw-telegram
config:
botToken: "xxx"
allowedChatIds:
- 123456789 # 个人
- -100123456789 # 群组(负数)
命令支持
在 BotFather 设置命令:
/setcommands
help - 获取帮助
status - 检查状态
clear - 清除对话
Webhook 模式(需要公网服务器)
plugins:
entries:
- plugin: openclaw-telegram
config:
botToken: "xxx"
webhook:
url: "https://your-domain.com/telegram/webhook"
port: 8443
常见问题
Q: Bot 不回复
A: 检查 Chat ID 是否正确(正数是个人,负数是群组)
Q: 提示 "Forbidden: bot was blocked by the user"
A: 你可能之前屏蔽了 Bot,需要先解除屏蔽
Q: 群组消息无响应
A: 确保 Bot 在群组中,且有读取消息权限
成本
- Telegram Bot API:完全免费
- OpenClaw Gateway:本地运行,无费用
- AI 模型:按使用量计费(DeepSeek 最便宜)
需要帮助?
- 微信:yanghu_ai
- Telegram: @yanghu_openclaw
- 免费远程配置(首次)
Version: 1.0.0 Created: 2026-03-21
Related skills
- Downloads
- 2.7kAll time
- Security audit
- Pass
- Last updated
- 6mo ago
- Current version
- v1.0.0
- License
- MIT-0
