Get Information About the Operator's Dialog imopenlines.dialog.get
Scope:
imopenlinesWho can execute the method: any user with access permission to the dialog
The method imopenlines.dialog.get returns data from the open line chat. You only need to provide one of the parameters.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
CHAT_ID |
Identifier of the open line chat. The identifier can be obtained using the imopenlines.session.open or imopenlines.session.history.get methods. |
|
DIALOG_ID |
Identifier of the dialog in the format |
|
SESSION_ID |
Identifier of the session. The identifier can be obtained using the imopenlines.session.history.get method in the |
|
USER_CODE |
String code of the user for the external system channel. Code format:
The value can be obtained using the imopenlines.session.history.get method from |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"USER_CODE":"livechat|1|1373|211"}' \
https://your-domain.bitrix24.com/rest/1/webhook_key/imopenlines.dialog.get.json
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"USER_CODE":"livechat|1|1373|211","auth":"<access_token>"}' \
https://your-domain.bitrix24.com/rest/imopenlines.dialog.get.json
try {
const response = await $b24.callMethod(
'imopenlines.dialog.get',
{
USER_CODE: 'livechat|1|1373|211',
}
);
const { result } = response.getData();
console.log(result);
} catch (error) {
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'imopenlines.dialog.get',
[
'USER_CODE' => 'livechat|1|1373|211',
]
);
$result = $response
->getResponseData()
->getResult();
if ($result->error()) {
echo 'Error: ' . $result->error();
} else {
echo 'Success: ' . print_r($result->data(), true);
}
} catch (Throwable $exception) {
error_log($exception->getMessage());
echo 'Error getting dialog: ' . $exception->getMessage();
}
BX24.callMethod(
'imopenlines.dialog.get',
{
USER_CODE: 'livechat|1|1373|211',
},
function(result) {
if (result.error()) {
console.error(result.error().ex);
} else {
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'imopenlines.dialog.get',
[
'USER_CODE' => 'livechat|1|1373|211',
]
);
if (!empty($result['error'])) {
echo 'Error: ' . $result['error_description'];
} else {
echo 'Success: ' . print_r($result['result'], true);
}
Response Handling
HTTP Status: 200
{
"result": {
"id": 1777,
"parent_chat_id": 0,
"parent_message_id": 0,
"name": "Green Guest #17 - Bitrix24 Documentation",
"description": null,
"owner": 27,
"extranet": false,
"avatar": "",
"color": "#58cc47",
"type": "lines",
"counter": 0,
"user_counter": 2,
"message_count": 104,
"unread_id": 0,
"restrictions": {
"avatar": true,
"rename": true,
"extend": true,
"call": true,
"mute": true,
"leave": true,
"leave_owner": true,
"send": true,
"user_list": true
},
"last_message_id": 86313,
"last_id": 86313,
"marked_id": 0,
"disk_folder_id": 0,
"entity_type": "LINES",
"entity_id": "livechat|22|1775|599",
"entity_data_1": "Y|LEAD|1209|N|N|343|1773682918|0|0|0",
"entity_data_2": "LEAD|1209|COMPANY|0|CONTACT|0|DEAL|0",
"entity_data_3": "N",
"mute_list": [],
"date_create": "2026-03-13T16:50:15+01:00",
"message_type": "L",
"public": "",
"role": "owner",
"entity_link": {
"type": "LINES",
"url": "",
"id": "livechat|22|1775|599"
},
"text_field_enabled": true,
"background_id": null,
"permissions": {
"manage_users_add": "member",
"manage_users_delete": "manager",
"manage_ui": "member",
"manage_settings": "owner",
"manage_messages": "member",
"can_post": "member"
},
"is_new": false,
"readed_list": [
{
"user_id": 599,
"user_name": "Guest",
"message_id": 86101,
"date": null
}
],
"manager_list": [27],
"last_message_views": {
"message_id": 86313,
"first_viewers": [
{
"user_id": 27,
"user_name": "Samantha Johnson",
"date": "2026-03-16T20:50:37+01:00"
}
],
"count_of_viewers": 0
},
"dialog_id": "chat1777"
},
"time": {
"start": 1773683678,
"finish": 1773683678.423382,
"duration": 0.423382043838501,
"processing": 0,
"date_start": "2026-03-16T20:54:38+01:00",
"date_finish": "2026-03-16T20:54:38+01:00",
"operating_reset_at": 1773684278,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
Chat data object (detailed description) |
|
time |
Information about the request execution time |
Result Object
|
Name |
Description |
|
id |
Identifier of the chat |
|
parent_chat_id |
Identifier of the parent chat |
|
parent_message_id |
Identifier of the parent message |
|
name |
Name of the chat |
|
description |
Description of the chat or |
|
owner |
Identifier of the chat owner |
|
extranet |
Indicator of an extranet chat |
|
avatar |
URL of the chat avatar or an empty string |
|
color |
Color of the chat in HEX format |
|
dialog_id |
Identifier of the dialog in the format |
|
type |
Type of the chat, for open lines the value is |
|
counter |
Number of unread messages for the current user |
|
user_counter |
Number of participants with unread messages |
|
message_count |
Total number of messages in the chat |
|
unread_id |
Identifier of the first unread message or |
|
restrictions |
Permissions for actions with the chat (detailed description) |
|
last_message_id |
Identifier of the last message |
|
last_id |
Service identifier of the last message |
|
marked_id |
Identifier of the marked message or |
|
disk_folder_id |
Identifier of the Drive folder for chat files |
|
entity_type |
Type of the chat channel, for open lines the value is |
|
entity_id |
User code of the open line in the format
|
|
entity_data_1 |
String with session data of the open line |
|
entity_data_2 |
String with CRM bindings |
|
entity_data_3 |
Additional service flag |
|
mute_list |
List of user IDs with notifications turned off |
|
date_create |
Date and time of chat creation in ISO 8601 format (RFC3339) |
|
message_type |
Type of messages in the chat |
|
public |
Public flag of the chat |
|
role |
Role of the current user in the chat |
|
entity_link |
Link to the external system channel (detailed description) |
|
text_field_enabled |
Whether the message input field is available |
|
background_id |
Identifier of the chat background or |
|
permissions |
Permissions of the current user in the chat (detailed description) |
|
is_new |
Indicator of a new chat |
|
readed_list |
List of data about message readings (detailed description) |
|
manager_list |
List of identifiers of operators assigned as managers |
|
last_message_views |
Data about the views of the last message (detailed description) |
Restrictions Object
|
Name |
Description |
|
avatar |
Permission to change the chat avatar |
|
rename |
Permission to change the chat name |
|
extend |
Permission to extend chat settings |
|
call |
Permission for calls in the chat |
|
mute |
Permission to turn off notifications |
|
leave |
Permission to leave the chat |
|
leave_owner |
Permission for the chat owner to leave |
|
send |
Permission to send messages |
|
user_list |
Permission to view the list of participants |
Entity Link Object
|
Name |
Description |
|
type |
Type of the channel, for open lines the value is |
|
url |
Link to the external object of the channel or an empty string |
|
id |
External identifier of the dialog in the channel |
Permissions Object
|
Name |
Description |
|
manage_users_add |
Permission to add participants |
|
manage_users_delete |
Permission to remove participants |
|
manage_ui |
Permission to manage the chat interface |
|
manage_settings |
Permission to manage chat settings |
|
manage_messages |
Permission to manage messages |
|
can_post |
Permission to send messages |
Readed List Item Object
|
Name |
Description |
|
user_id |
Identifier of the user |
|
user_name |
Name of the user |
|
message_id |
Identifier of the last read message |
|
date |
Date and time of reading in ISO 8601 format (RFC3339) or |
Last Message Views Object
|
Name |
Description |
|
message_id |
Identifier of the message for which view statistics are collected |
|
first_viewers |
List of users who viewed the message first (detailed description) |
|
count_of_viewers |
Number of other users who viewed the message |
First Viewer Item Object
|
Name |
Description |
|
user_id |
Identifier of the user |
|
user_name |
Name of the user |
|
date |
Date and time of viewing in ISO 8601 format (RFC3339) |
Error Handling
HTTP Status: 400
{
"error": "ACCESS_ERROR",
"error_description": "You do not have access to the specified dialog"
}
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Possible Error Codes
|
Status |
Code |
Description |
Value |
|
|
|
You do not have access to the specified dialog |
Dialog not found or no access to it |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred, please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not allowed to be called using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The methods must be called using the HTTPS protocol |
|
|
|
The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support |
|
|
|
The REST API is available only on commercial plans |
|
|
|
The user whose access token or webhook was used to call the method lacks permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Get Chat by User Code imopenlines.session.open
- Start a New Dialogue imopenlines.session.start
- Join the Dialogue imopenlines.session.join
- Get Message History of the Dialogue imopenlines.session.history.get
- Take Over the Dialogue from the Current Operator imopenlines.session.intercept
- Pin or Unpin a Dialog imopenlines.session.mode.pin
- Pin All Available Dialogs to the Operator imopenlines.session.mode.pinAll
- Unpin All Operator Dialogs imopenlines.session.mode.unpinAll
- Switch the dialog to silent mode imopenlines.session.mode.silent
- Rate Employee Performance in the imopenlines.session.head.vote Dialog
- Start a New Dialogue Based on the Message imopenlines.message.session.start
- Create a Lead Based on the Dialogue imopenlines.crm.lead.create