> For the complete documentation index, see [llms.txt](https://help.blinger.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blinger.io/russian/opisanie-raboty/channels/dobavlenie-kanalov/livechat.md).

# LiveChat

## Общая информация

Канал Livechat - это онлайн-чат от Blinger.io

## Подключить LiveChat?

### Шаг 1. Открыть вкладку «Приложения» и нажать кнопку «Добавить»

![](/files/-LlqAvctzb5OCngjsdci)

### **Шаг 2. Выбрать канал LiveChat и нажать** «Добавить **LiveChat**»

![](/files/-Lm4hZg0sfoRm3-i-U2l)

### Шаг 3. Нажать "Добавить"

![](/files/-Lm9BGsycNf4KnwoDYxt)

{% hint style="success" %}

### **Интеграция завершена!**

{% endhint %}

## Настроить Livechat для авторизованной зоны?

Данная функция позволяет передавать данные залогиненного аккаунта непосредственно в Blinger.io

### Шаг 1. **Получить Secret key**

Чтобы получить Secret key, необходимо зайти в раздел "Приложения", нажать "Изменить" в блоке Livechat и скопировать на странице настроек значение в поле Secret key&#x20;

{% hint style="warning" %}
Если поле **Secret key** пустое, тогда нужно удалить LiveChat и добавить заново
{% endhint %}

![](/files/-LoV7jQBkD300zJYh95r)

### Шаг 2. Разместить дополнительный код на странице виджета

Перед js-кодом Виджета разместить на этой же странице следующий код:

{% hint style="info" %}
Передавать можно любое количество параметров
{% endhint %}

```javascript
<script>
 var customBlingerConfig = {
   customLivechatFields: {
     your_custom_param_1: 123,
     your_custom_param_2: 'my value',
     your_custom_param_n: 999,
     sign: 'ff127a29530759df7752f6ffab2a78fd'
   }
 };
</script>
```

### Шаг 3. Вычислить значение параметра `sign`

Значение параметра `sign` зависит от значений, передаваемых параметров - это hash от значений параметров. Hash вычисляется на стороне вашего сервера и требуется для защиты передаваемых параметров от изменений третьих лиц.

Вычисляется следующим образом:

1. конкатенация всех значений передаваемых параметров + **Secret key**
2. вычисление MD5 hash от полученной строки

{% hint style="info" %}
**Пример:**

1. возьмем любые параметры, например, **`Rdr9ucDi19nixmpevci5EiOvlFVyXbCT`**
2. делаем конкатенацию значений параметров: **`“123my value999Rdr9ucDi19nixmpevci5EiOvlFVyXbCT”`**
3. вычисляем хеш: **`md5(“123my value999Rdr9ucDi19nixmpevci5EiOvlFVyXbCT”)`**
4. полученный хеш подставляем как значение **`sign: 'ff127a29530759df7752f6ffab2a78fd'`**
   {% endhint %}

### Шаг 4. Вычисление параметра на стороне Blinger.io

На стороне Blinger.io будет произведена аналогичная операция. После чего будет сопоставлен полученный hash с тем, который пришел с вашей стороны. При совпадении клиент будет помечен в Blinger.io значком <img src="/files/-LoVBzInCLRCLq3GtM7-" alt="" data-size="original"> . Пример ниже:&#x20;

![](/files/-LoVC8y8-gnMKdIHUhCV)

При нажатии на <img src="/files/-LoVBzInCLRCLq3GtM7-" alt="" data-size="original"> или аватар клиента, можно увидеть в таблице Сustom Fields значения параметров, которые добавляли на втором шаге.

![](/files/-LoVCjIbv3bH2qP2XSd0)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.blinger.io/russian/opisanie-raboty/channels/dobavlenie-kanalov/livechat.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
