Skip to main content
GenosOS connects to Telegram using grammY, a modern Telegram Bot API framework. You need a bot token from @BotFather — the agent walks you through the entire process.

Connect Telegram

Tell your assistant you want to connect:
You: "Connect Telegram"
The agent opens the Telegram setup guide and walks you through each step interactively.
1

Open @BotFather

Open the Telegram app on any device. Search for @BotFather and start a conversation with it. BotFather is Telegram’s official bot creation service.
2

Create a new bot

Send /newbot to BotFather. It will ask you to choose a display name (anything you like) and a username (must end in bot, e.g. my_assistant_bot).
3

Copy the token

BotFather replies with a bot token — a long string that looks like 123456789:ABCdef.... Copy the entire token.
4

Paste the token to your assistant

Switch back to your GenosOS chat and paste the token:
You: "Here is the token: 123456789:ABCdef..."
The agent stores it securely in the encrypted vault and enables the channel.
5

Verify the connection

The agent probes the channel and confirms it is connected. Open Telegram and send your bot a message to test.
Give your bot a good profile picture and description from BotFather. Use /setdescription and /setuserpic — it helps users understand what the bot does before they message it.

DM policy

The default policy is pairing. When someone messages your bot for the first time, they receive a 6-digit code that you must approve.
You: "Open Telegram to anyone"
You: "Only allow specific users on Telegram"
You: "Who is waiting to join on Telegram?"
PolicyBehavior
pairingUnknown senders get a 6-digit code. You approve via the agent.
allowlistOnly user IDs you specify can interact.
openAccept messages from anyone.
disabledIgnore all incoming Telegram messages.

Polling vs webhook mode

By default, GenosOS uses long polling — the bot continuously checks Telegram’s servers for new messages. This works without any public URL or tunnel. If you want webhook mode (Telegram pushes messages to your server instead of you pulling), you need a publicly reachable URL:
You: "Switch Telegram to webhook mode"
The agent will ask for your public URL and configure it automatically.
For most self-hosted setups, polling is the simpler choice. Webhook mode is useful if you want lower latency or are running behind a load balancer.

Security

Telegram is a messaging channel. The agent cannot run shell commands, execute processes, or invoke bash scripts from a Telegram conversation — regardless of what the message contains. This restriction is architectural. What Telegram conversations can do: read files, search memory, send messages, use web tools, query APIs.