Integrations & Debugging
Connect your favorite messaging platforms and troubleshoot issues.
Telegram Bot Setup
Step 1: Create Your Bot with BotFather
- Open Telegram and search for '<'code'>'@BotFather'<'/code'>'
- Send '<'code'>'/newbot'<'/code'>' and follow the prompts
- Choose a name (e.g., "My OpenClaw") and username (must end in "bot")
- BotFather will give you a token like: '<'code'>'123456789:ABC-DEF1234ghIkl-zyx57W2v1u123ew11'<'/code'>'
Anyone with this token can control your bot. If it leaks, use '<'code'>'/revoke'<'/code'>' with BotFather to generate a new one.
Step 2: Add Token to OpenClaw
Use the CLI to register the provider:
moltbot providers add --provider telegram --token YOUR_BOT_TOKENOr add to your config directly:
// ~/.clawdbot/config.json
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "123456789:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
"dmPolicy": "allowlist",
"allowFrom": ["YOUR_TELEGRAM_USER_ID"],
"groupPolicy": "allowlist",
"streamMode": "partial"
}
}
}Step 3: Configure DM Policy
By default, '<'code'>'dmPolicy'<'/code'>' is set to '<'code'>'"pairing"'<'/code'>':
- '<'strong'>'pairing:'<'/strong'>' Unknown senders receive a pairing code (expires after 1 hour)
- '<'strong'>'allowlist:'<'/strong'>' Only allow specific user IDs
- '<'strong'>'open:'<'/strong'>' Allow anyone (not recommended!)
To approve a pairing request:
moltbot pairing list telegram
moltbot pairing approve telegram <CODE>Step 4: Group Configuration
Telegram bots use Privacy Mode by default—they only see messages that mention them. To see all messages, add the bot as a '<'strong'>'group admin'<'/strong'>'.
Step 5: Restart Gateway
moltbot gateway restartGA4 high-intent integration triage
If you landed here from search or direct traffic, choose the fastest path before changing tokens or restarting the gateway.
Setting up a new channel
Start with Telegram setup, then verify DM policy and pairing before inviting the bot into groups.
A channel went silent
Check channel status, logs, IPv6 or intent settings before rotating credentials.
Gateway restart needed
Restart only after recording the channel, last successful message, and exact error so the incident remains debuggable.
Escalating to maintainers
Bring config shape, channel name, provider version, and one reproducible send or receive failure.
Choose the right integration fix before you restart
Most integration visits come from setup or incident traffic. Use this short router to avoid changing the wrong layer.
Bot token or provider credential changed
Rotate the credential only when the platform portal shows it was revoked, leaked, or belongs to the wrong bot account.
The bot receives nothing from a user or group
Check DM policy, pairing state, allowlist, group privacy mode, and platform intents before treating it as an outage.
The channel worked, then stopped after a restart
Capture gateway logs, provider version, config diff, and the last successful message before restarting again.
Integration setup proof packet
Before restarting or escalating, capture these four facts so setup traffic turns into a resolved channel instead of another vague incident.
Config shape
Record provider name, enabled channel, DM policy, allowlist or pairing mode, and whether the bot is running in a group or direct message.
Sender identity
Capture the user ID, group ID, bot username, and the exact account that should be allowed to speak to OpenClaw.
Round-trip proof
Save one outbound test, one inbound reply, timestamp, and the last successful message before changing tokens.
Rollback path
Write down the previous token or channel config location, who can rotate it, and the restart command to restore service.
Debug Clinic
Common issues and their solutions. Click to expand.
OC NEWS