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

# Telegram

> Send and manage Telegram bot messages through the Telegram Bot API

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key comes from `TELEGRAM_BOT_TOKEN`.
* **Docs**: [https://core.telegram.org/bots/api#authorizing-your-bot](https://core.telegram.org/bots/api#authorizing-your-bot)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable             | Required | Description                                                                                                                           |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `TELEGRAM_BOT_TOKEN` | Yes      | Telegram bot token issued by @BotFather, in the form 123456789:ABC-DEF.... [Docs](https://core.telegram.org/bots/features#botfather). |

## Setup

1. **Create a bot with @BotFather**: In any Telegram client (a regular free Telegram account works), open a chat with @BotFather, send /newbot, and follow the prompts to pick a display name and a unique username ending in 'bot'. BotFather replies with the bot token.
2. **Store the token**: Set the token from BotFather as TELEGRAM\_BOT\_TOKEN. You can regenerate it at any time with /revoke in @BotFather, which invalidates the old token.
3. **Open a chat with the bot**: Bots cannot message users first. Start a direct chat with your bot (or add it to a group) and send it a message; the chat then appears in getUpdates, where you can read the numeric chat\_id used to address messages.

* The Telegram Bot API authenticates by embedding the bot token in the request URL path ([https://api.telegram.org/bot\&lt;token\&gt;/\&lt;method](https://api.telegram.org/bot\&lt;token\&gt;/\&lt;method)>); it does not accept the token in an HTTP header.
* Keep the token secret: anyone who has it fully controls the bot.

Provider API reference: [https://core.telegram.org/bots/api](https://core.telegram.org/bots/api)

## Tools

| Tool              | Access | Description                                                                                       |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------- |
| Send Message      | Write  | Send a text message to a chat, group, or channel the bot has access to                            |
| Get Updates       | Read   | Receive incoming updates (messages sent to the bot) via long polling; use it to discover chat ids |
| Get Me            | Read   | Return basic information about the bot itself; useful for verifying the token works               |
| Send Photo        | Write  | Send a photo to a chat by passing a publicly reachable HTTP URL or an existing Telegram file\_id  |
| Edit Message Text | Write  | Edit the text of a message previously sent by the bot                                             |
