Skip to main content

Get chats users

Gets the list of chat users by ID

Function GetChatUsers(Val URL, Val ChatID, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
ChatID--chatString, NumberChat ID
Token--tokenStringAccess token, when app auth method used

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


tip

Method at API documentation: im.chat.user.list


1C:Enterprise/OneScript code example
    URL    = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
ChatID = "1106";

Result = OPI_Bitrix24.GetChatUsers(URL, ChatID);

URL = "b24-ar17wx.bitrix24.by";
Token = "35c31667006e9f06006b12e400000001000...";
ChatID = "1108";

Result = OPI_Bitrix24.GetChatUsers(URL, ChatID, Token);
    oint bitrix24 GetChatUsers \
--url "b24-ar17wx.bitrix24.by" \
--chat 1188 \
--token "***"
Result
{
"result": [
1,
10
],
"time": {
"start": 1728454872.6475,
"finish": 1728454872.68151,
"duration": 0.0340070724487305,
"processing": 0.00371289253234863,
"date_start": "2024-10-09T09:21:12+03:00",
"date_finish": "2024-10-09T09:21:12+03:00",
"operating_reset_at": 1728455472,
"operating": 0
}
}