Short answer. Create a bot with @BotFather in Telegram (/newbot) and copy its token. Give the token to OpenClaw, then allow only your own numeric Telegram user ID to message it. On your own machine that is openclaw channels add --channel telegram --token <token> plus dmPolicy: "allowlist" with your ID in allowFrom. On PlayNHost you paste the token and your ID on the Agent page and restart.
Checked on 6 November 2026, accurate for OpenClaw 2026.11.1.
This guide uses OpenClaw's Telegram documentation and the PlayNHost panel as it works today. Telegram is built into OpenClaw: there is no plugin to install.
Step 1: create the bot and copy its token
In Telegram, open a chat with @BotFather. Check that the handle is exactly @BotFather.
Send /newbot, choose a display name, then a username that ends in bot.
BotFather replies with the token, which looks like 123456789:AAH.... Keep it private: anyone with it can control your bot.
BotFather also has a web app (t.me/BotFather?startapp) that does the same thing with buttons.
Use a bot that nothing else runs. If an older OpenClaw on your laptop, or any other program, still uses the same token, stop it first or create a new bot.
Step 2: find your Telegram user ID
OpenClaw's allowlist takes your numeric user ID, not your @username, phone number or the bot's ID. The ways OpenClaw's docs list:
From the bot itself (no third party). While the bot is in pairing mode, send it any message. Its pairing reply includes "Your Telegram user id". On PlayNHost this is the way we suggest, see below.
From OpenClaw's log. Run openclaw logs --follow, message the bot and read senderUserId in the telegram pairing request entry.
Telegram's own API. Message the bot, then open https://api.telegram.org/bot<bot_token>/getUpdates and read message.from.id.
A third-party bot such as @userinfobot or @getidsbot. OpenClaw's docs call this less private.
Step 3 on PlayNHost: paste the token and your ID
You need an AI provider key on the same page. Without one, Start stops with "Your agent is not set up yet: it needs an API key from one AI provider and a Telegram or Discord bot token."
Under Chat apps, press Set on Telegram bot token, paste the token from BotFather and press Save. The panel checks its shape; a wrong paste gets "That is not a valid telegram bot token." Once saved, the row shows only the last four characters, and the token is never shown again.
Don't know your ID yet? Leave Telegram user IDs empty and press Start. When the agent is up, the console prints:
[PlayNHost] Your agent is running
[PlayNHost] Telegram: nobody can message your agent yet. Send your bot any message: it answers with your Telegram user ID. Copy that ID, put it on the Agent page, then restart. Ignore the pairing code in its reply.
Send your bot a message in Telegram. It answers once with a pairing code and your Telegram user ID (OpenClaw sends a code about once an hour per person and ignores the messages in between). Copy the ID and ignore the code: nothing needs approving on PlayNHost. Nobody is let in by this step.
Under Who can message it, type your ID into Telegram user IDs and press Save. Several IDs go on one line, separated by commas.
The page says "Changes apply the next time your agent starts." Press Restart now. The console then confirms:
[PlayNHost] Telegram: only user 123456789 can message your agent.
Message your bot. Your agent answers. Messages from any other Telegram account are ignored.
What PlayNHost sets for you
With IDs on the Agent page, Telegram DMs use dmPolicy: "allowlist" with exactly those IDs, which is what OpenClaw's docs recommend for a bot with one owner. With no ID, they use pairing: strangers get a code and are ignored, and nobody can approve them without OpenClaw's command line or dashboard, and a PlayNHost server offers neither.
The IDs you list also become OpenClaw's command owners (commands.ownerAllowFrom), so owner-only commands work for you from the first message.
The token reaches OpenClaw as TELEGRAM_BOT_TOKEN in its environment. A token written into OpenClaw's own settings file would win over that, so the start removes it from the file: the token on the Agent page is the one used.
Groups stay closed: OpenClaw admits no group until one is added to its settings, and a setting that lets anyone talk to the agent is switched back to your IDs at the next start.
The commands part makes you the owner for owner-only commands: OpenClaw does not do that for a hand-written allowlist. An allowlist with an empty allowFrom blocks every DM and is rejected by OpenClaw's config check.
Or keep the default pairing mode and approve yourself after your first message:
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
Codes expire after one hour. The first approved pairing also makes you the command owner.
Check the channel with openclaw channels status --probe.
When it does not answer
What you see
Cause and fix
Console: "Telegram: nobody can message your agent yet"
No ID is on the Agent page. Add yours and restart.
The bot replied once with a pairing code, then nothing
The Telegram user IDs list is empty, so the agent is in pairing mode. Put the number from the pairing reply on the Agent page and restart.
The bot ignores you and sends no code
An ID is on the list but it is not yours (for example the bot's ID or a group ID). To see your ID again, empty the list, restart and message the bot: the pairing reply shows it.
Console: "...entry in the allowed users list is not a Telegram user ID and was ignored"
A number in the list is too short or too long to be a Telegram user ID (PlayNHost accepts 5 to 20 digits). Check it against the pairing reply and restart.
getMe returned 401 in OpenClaw's log
Telegram refused the token: it was revoked or mistyped. In @BotFather, send /mybots, choose your bot, then API Token, copy it again and press Replace on the Agent page. On PlayNHost, OpenClaw's log is logs/openclaw.log in Files.
Nothing in a group
Groups are closed by default. Talk to the agent in a direct message.
We use cookies to keep the site working, to understand how it is used, and to measure our marketing. You can accept all, accept essential cookies only, or choose per category.We use cookies to keep the site working, to understand how it is used, and to measure our marketing. They are on by default here. You can switch off anything you do not want.Read our privacy policy