---
sidebar_position: 14
description: Get dialog and other functions to work with Bitrix24 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get dialog
 Get chat data by ID



`Function GetDialog(Val URL, Val ChatID, Val Token = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | URL | --url | String | &#x2714; | URL of webhook or a Bitrix24 domain, when token used |
  | ChatID | --chat | String, Number | &#x2714; | Chat ID (as chatXXX) or User ID (as XXX) |
  | Token | --token | String | &#x2716; | Access token, when app auth method used |

  
  Returns:  Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API

:::tip
Method at API documentation: [im.dialog.get](https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=93&LESSON_ID=12886)
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    URL    = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
    ChatID = "3516";

    OPI_TypeConversion.GetLine(ChatID);

    ChatString = "chat" + ChatID;

    Result = OPI_Bitrix24.GetDialog(URL, ChatString);

    URL    = "b24-ar17wx.bitrix24.by";
    Token  = "6ad03969006e9f06006b12e400000001000...";
    UserID = 10;

    Result = OPI_Bitrix24.GetDialog(URL, UserID, Token);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint bitrix24 GetDialog \
             --url "b24-ar17wx.bitrix24.by" \
             --chat "***" \
             --token "***"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint bitrix24 GetDialog ^
             --url "b24-ar17wx.bitrix24.by" ^
             --chat "***" ^
             --token "***"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "result": {
  "id": 10,
  "parent_chat_id": "***",
  "parent_message_id": 0,
  "name": "",
  "description": null,
  "owner": 10,
  "extranet": false,
  "avatar": "",
  "color": "#ab7761",
  "type": "private",
  "counter": 0,
  "user_counter": 0,
  "message_count": 773,
  "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": 70384,
  "last_id": 3854,
  "marked_id": 0,
  "disk_folder_id": 0,
  "entity_type": "",
  "entity_id": "",
  "entity_data_1": "",
  "entity_data_2": "",
  "entity_data_3": "",
  "mute_list": [],
  "date_create": "2024-06-15T16:48:49+00:00",
  "message_type": "P",
  "public": "",
  "role": "member",
  "entity_link": {
   "type": "",
   "url": "",
   "id": ""
  },
  "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": 10,
    "user_name": "Techno Pizza",
    "message_id": 3854,
    "date": null
   }
  ],
  "manager_list": [],
  "last_message_views": {
   "message_id": 70384,
   "first_viewers": [],
   "count_of_viewers": 0
  },
  "dialog_id": "10"
 },
 "time": {
  "start": 1765396715,
  "finish": 1765396715.6309,
  "duration": 0.630904912948608,
  "processing": 0,
  "date_start": "2025-12-10T19:58:35+00:00",
  "date_finish": "2025-12-10T19:58:35+00:00",
  "operating_reset_at": 1765397315,
  "operating": 0
 }
}
```
