# Telegram

Connects an agent to a Telegram bot. Users message the bot on Telegram; the agent receives and replies within the same chat.

- **Supported agents:** Chatbot, Agentic Flow
- **Route type:** Conversation

## Before You Start

- Message **@BotFather** on Telegram.
- Use the `/newbot` command to create a bot and follow the prompts.
- Copy the **Bot Auth Token** provided by BotFather (format: `123456789:ABCdef...`).

Your agent must be published with an active version.

## Configuration

**Credentials**

- **Bot Auth Token** — The authentication token from BotFather. Required.

**Route Settings**

- **Description** — Optional label for this channel instance.
- **Purpose** — Optional note on when the agent should use this channel.
- **Session Expiry (hours)** — Idle timeout before a conversation session resets. Default: 4. Range: 0.01–48.

## Webhook Security

Neo registers a secret token with Telegram when you save the channel, and rejects any update that does not carry it. You do not enter the token yourself — it is derived from the **Bot Auth Token**.

> **Note**
>
> Channels created before version 6.1 do not have a secret token registered. Open the channel’s credential and save it, then save the channel, so the token is registered with Telegram. Until then, Telegram messages to the agent are rejected.
