Get current user
Get current user data
Function GetCurrentUser(Val URL, Val Token = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
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: user.current
1C:Enterprise/OneScript code example
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
Result = OPI_Bitrix24.GetCurrentUser(URL);
URL = "b24-ar17wx.bitrix24.by";
Token = "35c31667006e9f06006b12e400000001000...";
Result = OPI_Bitrix24.GetCurrentUser(URL, Token);
- Bash
- CMD/Bat
oint bitrix24 GetCurrentUser \
--url "b24-ar17wx.bitrix24.by" \
--token "***"
oint bitrix24 GetCurrentUser ^
--url "b24-ar17wx.bitrix24.by" ^
--token "***"
Result
{
"result": {
"ID": "1",
"XML_ID": "53818298",
"ACTIVE": true,
"NAME": "Антон",
"LAST_NAME": "Титовец",
"EMAIL": "no-reply@bitrix24.com",
"LAST_LOGIN": "2024-09-17T21:21:38+03:00",
"DATE_REGISTER": "2024-02-10T03:00:00+03:00",
"IS_ONLINE": "N",
"TIME_ZONE_OFFSET": "0",
"TIMESTAMP_X": "29.08.2024 10:12:45",
"LAST_ACTIVITY_DATE": "2024-09-17 21:21:49",
"PERSONAL_GENDER": "",
"PERSONAL_BIRTHDAY": "",
"PERSONAL_PHOTO": "https://cdn-ru.bitrix24.by/b28528874/main/d7e/d7e99cf556e4ab676463dae2c00ddfbb/a7e0af6899300e3c684caeca5c334d81.jpg",
"UF_EMPLOYMENT_DATE": "",
"UF_DEPARTMENT": [
1,
264
]
},
"time": {
"start": 1728454930.6427,
"finish": 1728454930.67441,
"duration": 0.0317108631134033,
"processing": 0.00330090522766113,
"date_start": "2024-10-09T09:22:10+03:00",
"date_finish": "2024-10-09T09:22:10+03:00",
"operating_reset_at": 1728455530,
"operating": 0
}
}