Telegram
Connect your Telegram account, and your agent can react to messages in the chats you pick. It signs in as your Telegram user, not a bot, so it can see your private chats, groups, and channels.
Before you start
Section titled “Before you start”- The agent must run on the OpenClaw runtime.
- You need the phone number for your Telegram account.
- On a self-hosted agent, the host needs Python 3.9 or later. Managed agents already have Python.
- Only subscribe to chats you have permission to process, and follow Telegram’s API terms.
Connect Telegram
Section titled “Connect Telegram”Telegram is a connection on one agent, not a channel, so it’s under Connections.
-
Open the agent in the dashboard and select its Connections tab.
-
Select Add new connection, then Telegram (local user session). Alfe prepares Telegram on the agent, which takes a moment.
-
Enter your Mobile number, including the country code.
-
Enter the Verification code Telegram sends you.
-
If you use two-step verification, enter your password.
-
When you see Telegram connected, select Done.
A sign-in attempt expires after 10 minutes. If that happens, select Start again.
The connection shows Enabled on agent, which means Telegram is turned on. The sign-in itself lives on the agent, so ask the agent for its Telegram status to check it. To sign in again later, select Sign in on the connection.
Choose which chats to monitor
Section titled “Choose which chats to monitor”The agent reads nothing until you subscribe it to a chat. Ask the agent to:
- List the chats your account can see.
- Subscribe to the ones you pick.
- Unsubscribe later if you change your mind.
New text messages and captions in subscribed chats can then start work for the agent.
How your account stays private
Section titled “How your account stays private”- Your session stays on the agent’s machine. Alfe’s cloud doesn’t hold your Telegram session.
- Your sign-in details stay out of the agent. The browser encrypts your phone number, code, and password for that sign-in. They don’t enter prompts, logs, or configuration.
Remove Telegram
Section titled “Remove Telegram”Disconnecting stops and uninstalls the listener. It doesn’t sign the device out of Telegram.
Before you retire the machine, run this on it to revoke the session and remove local state:
npx -y @alfe.ai/openclaw-telegram logout --agent-id <AGENT_ID>Related
Section titled “Related”- Connected accounts overview explains how connections work.
- Providers and connection management lists every provider.