> **Photon Beta documentation**
> Browse all pages: https://photon.codes/docs/beta/llms.txt
> Search Beta docs via MCP: https://photon.codes/docs/beta/mcp (OAuth REST API MCP: https://mcp.photon.codes/mcp)

# Connect Telegram

> Create a Telegram bot for your agent and send it its first message.

> [!WARNING]
>
> **Beta is a preview.** The Beta (2.0) platform does not have all the features
> of [Stable](https://photon.codes/docs/spectrum-ts/introduction) yet. For example, iMessage on Beta
> supports text, attachments, voice messages, replies, read receipts, and typing
> indicators, but tapbacks, polls, and message effects are
> [only on Stable](https://photon.codes/docs/spectrum-ts/providers/imessage/messaging-features) for now.
> Use Stable for production agents, and confirm that Beta supports the features
> you need before you buy a plan.

Give your agent its own Telegram bot. You start in the dashboard, then create
the bot in a Telegram chat with Photon's bot manager. Message the bot, and the
message reaches your project.

## Prerequisites

You need:

* A project from [Set up your project](/docs/beta/get-started/project.md).
* A Telegram account.
* The owner, admin, or member role in the project's organization.

## 1. Open the bot manager

Open [**Telegram**](https://app.beta.photon.codes/project/platforms/telegram)
in your project and select **Connect a bot**. Telegram opens in a new tab,
in a chat with Photon's bot manager. If Telegram shows **Start**, select it.

You don't need a bot token from BotFather. The bot manager connects the
bot for you.

To start the connection from code instead, call
[`connectTelegramBot`](/docs/beta/api-client/sdk/projects/platforms/connect-telegram-bot.md)
and open the setup link it returns.

## 2. Create your bot

The bot manager offers **Create bot** and **Connect existing bot**. Select
**Create bot**.

Telegram opens its own dialog for a new bot. It suggests a name and a
username. Change either one if you want, then create the bot.

If you kept the suggested username, the bot manager connects the bot on
its own. If you changed it, the bot manager shows the new bot. Select
**Select this bot**, then **Confirm connection**.

The bot manager sends a new message when the bot is connected. In the
dashboard, the bot appears under **Bots** as **Connected**.

## 3. Message your bot

Under **Bots**, open your bot. In the **Bot link** row, select **Open in
Telegram**. If Telegram shows **Start**, select it. Then send any message,
such as **hi**.

## 4. Check that it arrived

Your message appears under **Recent messages** on the bot's page. Select
**Inbox** to open the conversation. From now on, every message to the bot
reaches your project.

## How a Telegram bot works

* **People message the bot first.** A Telegram bot can't start a chat. Your
  agent can reply after someone sends the bot a message.
* Every message sent to the bot reaches your project. To invite someone, share
  the bot's link from **Bot link**.
* Your agent sends only in private chats. A group chat with the bot stays
  readable in **Inbox**, but your agent can't reply there.
* Connecting a bot is free. Photon doesn't charge per message for Telegram.

## If your message doesn't arrive

| What you see | What to check |
| - | - |
| No **Connect a bot** button | Your role. Owners, admins, and members of the organization can connect a bot. |
| Telegram doesn't open | Your browser blocked the new tab. Allow pop-ups for the dashboard, then select **Try again**. |
| **Pick up where you left off?** | A setup is already in progress, and a project runs one at a time. Select **Continue in Telegram** to finish it, or start over. |
| The bot manager says the bot could not be connected | Nothing was connected. Select **Connect a bot** to start a new setup. |
| The bot shows **Needs attention** | Open the bot and read **Connection issue**. Then **Disconnect** the bot and connect it again. |
| The bot is **Connected**, but your message doesn't appear | You messaged a different bot. Compare the bot's **Username** with the chat in Telegram. |

## Next: receive messages

[Receive messages](/docs/beta/get-started/receive-messages.md)

Get each message to your bot as an event in your code.
