OpenClaw Telegram Bot Setup Guide with API Credentials
安装这个技能 https://github.com/crazypeace/openclaw-skill-telethon-session
You can choose to let openclaw handle the entire process with full permissions, so you will input api_id, api_hash, phone number, 2FA
This information will be exposed to the LLM model
api_id:
58192647
api_hash:
7c4a91f2d8be63a0ef54c7b129ad806e
phone number:
+86 186 1234 5678
Then you can read messages and send messages.
* At the very beginning when installing the Python environment, openclaw may prompt you that elevated permissions are insufficient. You can set permissions so roughly like this
Set the configuration file
tools.exec.ask = off
tools.exec.security = full
Restart gateway
========
If your openclaw just refuses to install the Python environment, you must do it yourself. (I don't know why, but I've encountered it many times)
Or you don't want to expose information like api_id, api_hash, phone number, 2FA to the LLM model,
Then, you can also run the script yourself in the SSH session command line. Refer to the contents of the SKILL.md file
Input api id, api hash, phone number, these will only be saved as system variables and not directly exposed to the LLM
The 2FA input will not be saved. In the future, reading messages and sending messages will only use the .session file.
Just like this:
After the .session file is generated, you can read and send messages within openclaw.
Just like the following
读取与 telegram @crazypeace 的对话记录
向 telegram @crazypeace 发送以下信息
test from openclaw 2026-3-30 15:57
========
End
========
update
openclaw v2026.4.1 Open permissions
Modify ~/.openclaw/exec-approvals.json
"defaults": {
"security": "full",
"ask": "off",
"askFallback": "full",
"autoAllowSkills": true
},
========
Also want to see
《Openclaw uses multi-Agent collaboration to complete tasks in topic-based Telegram groups》