Skip to main content

Change user status

Activates or deactivates (fire) the selected user

Function ChangeUserStatus(Val URL, Val UserID, Val Fire = True, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
UserID--useridString, NumberUser ID
Fire--fireBooleanTrue > Deactivation, False > Activation
Token--tokenStringAccess token, when app auth method used

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


1C:Enterprise/OneScript code example
    URL    = "https://b24-ar17wx.bitrix24.by/rest/1/yg2...";
UserID = "1072";

Result = OPI_Bitrix24.ChangeUserStatus(URL, UserID, True);

URL = "b24-ar17wx.bitrix24.by";
Token = "2f4e4067006e9f06006b12e400000001000...";
UserID = "1074";

Result = OPI_Bitrix24.ChangeUserStatus(URL, UserID, True, Token);
    oint bitrix24 ChangeUserStatus \
--url "b24-ar17wx.bitrix24.by" \
--userid 1090 \
--fire true \
--token "***"
Result
{
"result": true,
"time": {
"start": 1728454937.15091,
"finish": 1728454937.42878,
"duration": 0.277868986129761,
"processing": 0.252010822296143,
"date_start": "2024-10-09T09:22:17+03:00",
"date_finish": "2024-10-09T09:22:17+03:00",
"operating_reset_at": 1728455537,
"operating": 0.53964114189148
}
}