Leave chat
Removes the current user from the chat room
Function LeaveChat(Val URL, Val ChatID, Val Token = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
| ChatID | --chat | String, Number | ✔ | Chat ID |
| Token | --token | String | ✖ | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
tip
Method at API documentation: im.chat.leave
1C:Enterprise/OneScript code example
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
ChatID = "3244";
Result = OPI_Bitrix24.LeaveChat(URL, ChatID);
URL = "b24-ar17wx.bitrix24.by";
Token = "8a1bee68006e9f06006b12e400000001000...";
ChatID = "3246";
Result = OPI_Bitrix24.LeaveChat(URL, ChatID, Token);
- Bash
- CMD/Bat
oint bitrix24 LeaveChat \
--url "b24-ar17wx.bitrix24.by" \
--chat 3266 \
--token "***"
oint bitrix24 LeaveChat ^
--url "b24-ar17wx.bitrix24.by" ^
--chat 3266 ^
--token "***"
Result
{
"result": true,
"time": {
"start": 1760522442,
"finish": 1760522443.38813,
"duration": 1.38813090324402,
"processing": 1,
"date_start": "2025-10-15T10:00:42+00:00",
"date_finish": "2025-10-15T10:00:43+00:00",
"operating_reset_at": 1760523042,
"operating": 0.388614892959595
}
}