1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/md/Bitrix24/Users-managment/Change-user-status.md

1.4 KiB

sidebar_position
5

Change user status

Activates or deactivates (fire) the selected user

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

Parameter CLI option Type Destination
URL --url String URL of webhook or a Bitrix24 domain, when token used
UserID --userid String, Number User ID
Fire --fire Boolean True > Deactivation, False > Activation
Token --token String Access token, when app auth method used

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


 URL = "https://b24-ar17wx.bitrix24.by/rest/1/f2ppp8uucc891111/";
 UserID = "78";
 
 Result = OPI_Bitrix24.ChangeUserStatus(URL, UserID, True);
 
 URL = "b24-ar17wx.bitrix24.by";
 Token = "fe3fa966006e9f06006b12e400000001000...";
 UserID = "80";
 
 Result = OPI_Bitrix24.ChangeUserStatus(URL, UserID, True, Token);
 
 oint bitrix24 ChangeUserStatus --url %url% --userid %userid% --fire %fire% --token %token%

{
 "result": true,
 "time": {
 "start": 1722328399.68494,
 "finish": 1722328399.94913,
 "duration": 0.264194965362549,
 "processing": 0.229634046554565,
 "date_start": "2024-07-30T08:33:19+00:00",
 "date_finish": "2024-07-30T08:33:19+00:00",
 "operating_reset_at": 1722328999,
 "operating": 0.5396409034729
 }
}