﻿# TelegramBot

> [HTML Version](telegrambot.html)

You can connect TelegramBot to a live chat so that customers and partners can send their requests via messenger and receive a response generated in the system interface by a chatbot or operator.

When receiving a message from TelegramBot, a new session will be created in the **Live Chats** workspace. If the client has already been contacted, the previous session will be resumed and the message will be displayed in it. 

In a connected TelegramBot, operators can independently [create new sessions](create-session.md) only with previously contacted users.

````
начало внимание

````
Only users included in the [Administrators](360006871932.md#administrator) group can configure live chats and connect messengers to them.

````
конец внимание

## ````
Connect TelegramBot

You can connect several available messengers to one live chat. However, each TelegramBot account can be linked to one live chat only.

Please note, that to integrate the live chat with TelegramBot, you need to set up an HTTPS connection.

To connect a TelegramBot to a live chat:

1. Go to the **Administration > Live Chats** workspace.

2. Select a live chat from the list or [create a new one](create_line.md) by clicking the **+Live Chat** button in the upper right corner.

3. Go to the **Messengers** tab and click the **(telegtambot.png)** button.

4. In the opened window, enter the following data:  
**(telegtambot_1.png)**

- **Name\***. Specify the name of the live chat.

- **Token\***. Paste the secret token received when creating the bot in Telegram.

- **Company’s public URL\***. Specify the address where TelegramBot accesses the system to transmit data. By default, the address of your BRIX Company is added in the field.

- **Use inline buttons**. Enable this option to send custom menu items to the user as a message in the chat with the bot. If disabled, they will appear below the text box.

5. Click **Connect**.

After verification, TelegramBot will be connected to the live chat.  
**(tg-bot-02.png)**

On the **Messengers and Inbox** tab, you can:

- Temporarily disconnect a channel: Click the **(tele_toggle.png) **switch next to its name. Its status will change from **Active** to **Interrupted**. To reconnect the channel, click the toggle switch again.

- Rename a channel: Click the pencil icon next to it.

- Permanently remove a messenger from the live chat settings: Click the trash can icon.

To learn more about managing a connected channel, see the following articles:

- [Remove a messenger or email channel from a live chat](delete-channel.md).

- [Reconnect a messenger or email](reconnect-channel.md).