To connect a Telegram Bot to LiveChat you need a Bot API Token (e.g. 12345:abcd...xyz).
/mybots
command to get the Bot's API Token./start
and then /newbot
commands. Follow the instructions and create your Telegram Bot; at the end, you will receive a Bot API Token.You can change the LiveChat Group for the connected Telegram account on Telegram Settings.
Then click on the account you want to update, and choose the new LiveChat Group. Click "Save" to apply changes.
Similarly to LiveChat Ban visitors, select the three dots icon "…" in the top right corner, and click on Ban Telegram User
. In the modal, click on Block User
.
Once a user has started a chat with Telegram Bot, basic user information is placed in attributes. The following custom attributes are available: default_telegram_id
, default_telegram_username
, default_telegram_profile
, default_telegram_language_code
.
Telegram bots have a deep linking mechanism that allows additional parameters to be passed to the bot on startup. It could be a user's token or ID from another platform.
Each bot has a link that opens a conversation with it in Telegram – https://t.me/<bot_username>
. Parameters can be added directly to this link to let your bot work with additional information on the fly, without any user input. For example, you could use:
https://t.me/your_bot?start=test_parameter
Please note, that only A-Z, a-z, 0-9, _, and - are allowed.
This parameter will be visible on LiveChat customer details as telegram_start_parameter
: