Get Chat Data im.dialog.get
Scope:
imWho can execute the method: any user — chat participant
The method im.dialog.get retrieves information about a chat.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
DIALOG_ID* |
Chat identifier in the format:
Examples: |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"DIALOG_ID":"chat1435"}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/im.dialog.get
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"DIALOG_ID":"chat1435","auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/im.dialog.get
try
{
const response = await $b24.callMethod(
'im.dialog.get',
{
DIALOG_ID: 'chat1435'
}
);
console.log(response.getData().result);
}
catch (error)
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'im.dialog.get',
[
'DIALOG_ID' => 'chat1435',
]
);
$result = $response
->getResponseData()
->getResult();
echo 'Success: ' . print_r($result, true);
} catch (Throwable $e) {
error_log($e->getMessage());
echo 'Error: ' . $e->getMessage();
}
BX24.callMethod(
'im.dialog.get',
{
DIALOG_ID: 'chat1435'
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'im.dialog.get',
[
'DIALOG_ID' => 'chat1435',
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP Status: 200
{
"result": {
"id": 1439,
"parent_chat_id": 0,
"parent_message_id": 0,
"name": "Deal Chat",
"description": "Discussion about the deal",
"owner": 503,
"extranet": false,
"avatar": "",
"color": "#f76187",
"type": "crm",
"counter": 0,
"user_counter": 3,
"message_count": 3,
"unread_id": 0,
"restrictions": {
"avatar": false,
"rename": false,
"extend": true,
"call": true,
"mute": true,
"leave": true,
"leave_owner": false,
"send": true,
"user_list": true,
"path": "",
"path_title": ""
},
"last_message_id": 84477,
"last_id": 84477,
"marked_id": 0,
"disk_folder_id": 0,
"entity_type": "CRM",
"entity_id": "DEAL|1663",
"entity_data_1": "",
"entity_data_2": "",
"entity_data_3": "",
"mute_list": [],
"date_create": "2026-02-25T16:50:58+01:00",
"message_type": "C",
"public": "",
"role": "owner",
"entity_link": {
"type": "DEAL",
"url": "/crm/deal/details/1663/",
"id": "DEAL|1663"
},
"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": 103,
"user_name": "John Smith",
"message_id": 0,
"date": null
},
{
"user_id": 547,
"user_name": "Peter Johnson",
"message_id": 0,
"date": null
}
],
"manager_list": [
503
],
"last_message_views": {
"message_id": 84477,
"first_viewers": [],
"count_of_viewers": 0
},
"dialog_id": "chat1439"
},
"time": {
"start": 1772030091,
"finish": 1772030091.165223,
"duration": 0.1652228832244873,
"processing": 0,
"date_start": "2026-02-25T17:34:51+01:00",
"date_finish": "2026-02-25T17:34:51+01:00",
"operating_reset_at": 1772030691,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
Root object containing chat data (detailed description) |
|
time |
Information about the request execution time |
Object result-item
|
Name |
Description |
|
id |
Chat identifier |
|
parent_chat_id |
Parent chat identifier |
|
parent_message_id |
Parent message identifier |
|
name |
Chat name |
|
description |
Chat description |
|
owner |
Chat owner identifier |
|
extranet |
Indicator of external extranet user participation |
|
avatar |
Link to the chat avatar |
|
color |
Chat color in HEX format |
|
type |
Chat type |
|
counter |
Unread message counter |
|
user_counter |
Number of chat participants |
|
message_count |
Number of messages in the chat |
|
unread_id |
Identifier of the first unread message |
|
restrictions |
Restrictions on actions in the chat (detailed description) |
|
last_message_id |
Identifier of the last message |
|
last_id |
Identifier of the last read message |
|
marked_id |
Identifier of the marked message |
|
disk_folder_id |
Identifier of the chat folder on Drive |
|
entity_type |
External code of the chat: type |
|
entity_id |
External code of the chat: identifier |
|
entity_data_1 |
External data 1 for the chat |
|
entity_data_2 |
External data 2 for the chat |
|
entity_data_3 |
External data 3 for the chat |
|
mute_list |
List of users with notifications disabled |
|
date_create |
Chat creation date in ATOM format |
|
message_type |
Type of chat messages |
|
public |
Indicator of chat public status |
|
role |
Current user's role in the chat |
|
entity_link |
Link to the related object (detailed description) |
|
text_field_enabled |
Availability of the message input field |
|
background_id |
Identifier of the chat background. If not specified, the value is |
|
permissions |
Permissions for actions in the chat (detailed description) |
|
is_new |
Indicator of a new dialog |
|
readed_list |
List of users and read statuses (detailed description) |
|
manager_list |
List of chat manager identifiers |
|
last_message_views |
Information about views of the last message (detailed description) |
|
dialog_id |
Identifier of the dialog passed in the |
Object restrictions
|
Name |
Description |
|
avatar |
Availability of avatar change |
|
rename |
Availability of name change |
|
extend |
Availability of chat extension |
|
call |
Availability of calls |
|
mute |
Availability of notifications mute |
|
leave |
Availability of leaving the chat |
|
leave_owner |
Availability of owner leaving the chat |
|
send |
Availability of message sending |
|
user_list |
Availability of viewing the participant list |
|
path |
Link to the chat |
|
path_title |
Text of the link to the chat |
Object entity_link
|
Name |
Description |
|
type |
Type of the related object |
|
url |
Link to the related object |
|
id |
Identifier of the related object |
Object permissions
|
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 |
Object readed_list
|
Name |
Description |
|
user_id |
User identifier |
|
user_name |
User name |
|
message_id |
Identifier of the last read message |
|
date |
Read date. If not specified, the value is |
Object last_message_views
|
Name |
Description |
|
message_id |
Identifier of the message |
|
first_viewers |
List of first viewers |
|
count_of_viewers |
Number of views |
Error Handling
HTTP Status: 400
{
"error": "DIALOG_ID_EMPTY",
"error_description": "Dialog ID can't be empty"
}
|
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 |
|
|
|
Dialog ID can't be empty |
Required parameter |
|
|
|
You do not have access to the specified dialog |
Insufficient rights to view the dialog |
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
- Create Chat im.chat.add
- Get Chat ID im.chat.get
- Get a Shortened List of Recent Chats im.recent.get
- Get the List of Chats im.recent.list