# Telegram-bot connection

This method is suitable for a separate Telegram bot with a name, link and commands. To connect a personal account, use [another instruction](<./telegram-personal-account.md>).

## Receiving a token

1. Open the official bot [@BotFather](https://t.me/BotFather) on Telegram.
2. Create a new bot with the `/newbot` command or select an existing one using `/mybots`.
3. Open **API Token**.
4. Copy the token.

The token gives you access to control of the bot. Do not send it to outsiders or insert it into prompts or messages.

## Connecting to ChatRex

1. Open **Integrations**.
2. Press **Connect integration**.
3. On the **Channels** tab, select **Telegram-bot**.
4. Insert the BotFather token in the **API Token** field.
5. Press **Connect**.
6. Make sure that the status **Connected** and the name of the Telegram bot are displayed.

## Designation of the channel

Open **My Bots → Change → Channels and launch**, add a connected Telegram channel and save the changes.

## Verification

1. Open the Telegram-bot at his link.
2. Press **Start** or send `/start`.
3. Ask a test question.
4. Check the answer in Telegram and the entry in **History** ChatRex.

If the bot is silent, check the token, integration status, channel assignment, subscription and launch conditions.

!!!warning
If the token accidentally became known to another person, recall it to BotFather, get a new one and update the ChatRex connection.
!!!
