Skip to main content

Get user

Gets user information by ID

Function GetUser(Val URL, Val UserID, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
UserID--useridString, NumberUser 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: user.get


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

Result = OPI_Bitrix24.GetUser(URL, UserID);

URL = "b24-ar17wx.bitrix24.by";
Token = "35c31667006e9f06006b12e400000001000...";
UserID = "722";

Result = OPI_Bitrix24.GetUser(URL, UserID, Token);
    oint bitrix24 GetUser \
--url "b24-ar17wx.bitrix24.by" \
--userid 802 \
--token "***"
Result
{
"result": [
{
"ID": "606",
"XML_ID": "57980692",
"ACTIVE": true,
"NAME": "Oleg",
"LAST_NAME": "Lama",
"EMAIL": "dd1a6790-a025-49be-90a4-d1cf06f2a89c@exepmple.org",
"LAST_LOGIN": "",
"DATE_REGISTER": "2024-10-09T03:00:00+03:00",
"IS_ONLINE": "N",
"TIMESTAMP_X": {},
"PERSONAL_GENDER": "",
"PERSONAL_BIRTHDAY": "",
"PERSONAL_MOBILE": "88003553535",
"UF_EMPLOYMENT_DATE": "",
"UF_DEPARTMENT": [
7
],
"USER_TYPE": "employee"
}
],
"total": 1,
"time": {
"start": 1728454936.70035,
"finish": 1728454936.73915,
"duration": 0.0388009548187256,
"processing": 0.0093529224395752,
"date_start": "2024-10-09T09:22:16+03:00",
"date_finish": "2024-10-09T09:22:16+03:00",
"operating_reset_at": 1728455536,
"operating": 0
}
}