> For the complete documentation index, see [llms.txt](https://docs.chainbot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chainbot.io/basic-usage/notify-channels/telegram.md).

# Telegram

## Telegram Push Types

1. [User (Message sent to an individual user)](#set-user)
2. [Group (Message sent to a group)](#set-group)
3. [Channel](#set-channel)[ (Message sent to a channel)](#set-channel)
4. [Bot (Create your own branded TG Bot)](#set-bot)

For push notifications of types 1 User, 2 Group, 3 Channel, messages are sent through ChainBot's official [Telegram Bot](https://t.me/chainbot_bot).

For type 4 Bot, you can configure a TG Bot branded for yourself, allowing you to spread it to more individuals, groups, and channels.

### How to Set Up User? <a href="#set-user" id="set-user"></a>

1. Choose Chat Type as User.
2. Click Get Chat ID and it will redirect you to the Telegram app.
3. After choosing "Start," you will receive a message from ChainBot that includes the Chat ID.
4. Copy the Chat ID and fill it in the ChainBot platform.

<figure><img src="/files/qzMllh7kjQyer3qhv20b" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/qs7iJjj40q9vfarcCrvS" alt=""><figcaption><p>Got your Chat ID</p></figcaption></figure>

<figure><img src="/files/PmesOgAnSSoYs12XTpGc" alt=""><figcaption></figcaption></figure>

### How to Set Up Group? <a href="#set-group" id="set-group"></a>

1. Choose Chat Type as Group.
2. Add the ChainBot bot to the Group.
3. Groups are divided into **Private** and **Public** types, first confirm the type of Group.
4. If it's a Private Group, you need to fill in the **Chat ID with a minus sign,** e.g., -123456.
5. If it's a Public Group, you need to fill in the **Group Name with an @ symbol,** e.g., @chainbot\_group.
6. Copy the Chat ID with a minus sign or the Group Name with @ symbol and fill it in on the ChainBot platform.

#### Adding the ChainBot Bot to the Group

<figure><img src="/files/QlKiOdJLTawbtQChEoVg" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/yYf7oK0XEZLvrWT1UZbq" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/LKQts843OXoObQK9sjdN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fejPWcsH9UXS4u76JvVG" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/t2nghQSXPRtnhwsq6SE0" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/uTdC6jwFt8JN4xWZZKnT" alt=""><figcaption></figcaption></figure>

#### Confirming the Type of Group <a href="#confirm-group-type" id="confirm-group-type"></a>

<figure><img src="/files/ksUtuQ9Rv0wleb7xvfZ8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CImvb3u2M1EbFoEPzfze" alt=""><figcaption></figcaption></figure>

#### Getting the Chat ID or Group Name

**You need to open Telegram on the web,** [**https://web.telegram.org/**](https://web.telegram.org/)

Get the Group Name of the Public Group from the web URL, e.g., @chainbot\_public\_group

<figure><img src="/files/IQ7ph0lDZ6GSuFrt0NPp" alt=""><figcaption></figcaption></figure>

Get the Chat ID of the Private Group from the web URL, e.g., -811463215

<figure><img src="https://github.com/ChainbotAI/doc-en/blob/master/.gitbook/assets/image%20(2)%20(1).png" alt=""><figcaption></figcaption></figure>

#### Fill in the Chat ID or Group Name on the ChainBot platform

<figure><img src="/files/6BfywJ75mFRcvi44Tw0K" alt=""><figcaption></figcaption></figure>

### How to Set Up Channel? <a href="#set-channel" id="set-channel"></a>

1. Choose Chat Type as Channel (steps are the same as Group).
2. Add the ChainBot bot to the Channel, **and set it as an admin** (steps are the same as Group).
3. Channels are divided into Private and Public types, **messages can only be pushed to Public Channels,** first confirm the Channel type (steps are the same as Group).
4. If it's a Public Channel, you need to fill in the **Channel Name with an @ symbol,** e.g., @chainbot\_channel (steps are the same as Group).

### How to Set Up Bot <a href="#set-bot" id="set-bot"></a>

1. First, you need to create your own Telegram Bot. Refer to Telegram's [official tutorial](https://core.telegram.org/bots/features#creating-a-new-bot).
2. After creating your own Bot using [BotFather](https://t.me/BotFather), you will see the API Token for this Bot. Or, you can choose the recently created Bot again from the /mybots menu command to view this API Token.

   <figure><img src="/files/DInIpc8k3n0ejKLRbCQR" alt=""><figcaption></figcaption></figure>
3. Copy the API Token, return to ChainBot, choose "Bot" as Chat Type, and paste the API Token in the corresponding input box. Click Save.

   <figure><img src="/files/yErsj50Hj1YN4kKfsDKc" alt=""><figcaption></figcaption></figure>
4. After saving successfully, you can control whether your Bot pushes messages in the current chat session using the `/start` and `/stop` commands. For example, you can add this Bot to a group, and as an admin, send the `/start` command in the group. The TG Bot will then send your monitoring messages in the group.

   <figure><img src="/files/MdD6PAKGc3RcaPnHGTkI" alt=""><figcaption></figcaption></figure>
