> ## Documentation Index
> Fetch the complete documentation index at: https://open.ag2.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram

> DM Sutando from your phone, watch, or anywhere Telegram works. About 90 seconds, with no developer portal.

Telegram routes bot creation through one conversation with @BotFather, so there is no developer portal, no OAuth scopes and no group to create.

## Before you start

* A Telegram account ([telegram.org/apps](https://telegram.org/apps)).
* AG2 Space installed and signed in on your Mac ([desktop.ag2.space](https://desktop.ag2.space)).

**1. Start a chat with BotFather**

Search Telegram for **BotFather** and open the result with the blue verified checkmark ([@BotFather](https://t.me/BotFather)); the others are lookalikes. Tap **Start**, then send `/newbot`.

**2. Pick a name and a username**

BotFather asks for a **display name** (anything) and a **username**, which must be unique across Telegram and end in `bot`, for example `lucy_sutando_bot`. It then replies with a token of the form `123456789:ABCdefGHIjklMNOpqrSTUvwxYZ`.

**3. Paste the token into AG2 Space**

Copy the token. In AG2 Space open **Settings → Channels**, paste it into **Telegram bot token** and click **Save** at the bottom. The field shows a **running** badge once the agent connects. The token is stored locally on your Mac.

> [!WARNING]
>
> The token grants full control over your bot. If it leaks, send `/revoke` to BotFather for a fresh one.

**4. Say hi**

Open your bot in Telegram, tap **START** (or send `/start`), then send "hello". The first time, the local services may take a minute or two to pick up the new bridge.

## How Sutando knows it is you

The first person to DM a fresh bot is enrolled as the owner: their Telegram user ID is written to `~/.claude/channels/telegram/access.json`, and DMs from anyone else are dropped by default. To allow another person, run this in [the agent terminal](https://open.ag2.space/sutando/terminal.md):

```text theme={null}
/telegram:access allow <telegram-user-id>
```

They can find their user ID by messaging [@userinfobot](https://t.me/userinfobot). See [Access Control Model](https://open.ag2.space/concepts/access-control-model.md) for how tiers apply.

## Troubleshooting

> [accordion] "Username is invalid" or "already taken"
>
> It must end in `bot` (any case) and be globally unique. Add your name or the year and try again.

> [accordion] The bot does not reply
>
> AG2 Space must be running on your Mac; Telegram reaches it by long-polling. If it is running, the token may have been truncated: copy it again from BotFather, paste, Save.

> [accordion] Adding the bot to a group
>
> Add it as a member and @mention it. By default Telegram's privacy mode shows a bot only messages that mention or reply to it; `/setprivacy` → your bot → **Disable** in BotFather lets it see every message.

> [accordion] I lost the token
>
> In BotFather send `/mybots`, pick the bot and tap **API Token**. `/revoke` rotates it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.