1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-19 22:33:07 +02:00

82 lines
1.8 KiB
Markdown
Raw Normal View History

---
sidebar_position: 2
---
# Get user
Gets user information by ID
`Function GetUser(Val URL, Val UserID, Val Token = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| URL | --url | String | URL of webhook or a Bitrix24 domain, when token used |
| UserID | --userid | String, Number | User ID |
| Token | --token | String | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
Method at API documentation: [user.get](https://dev.1c-bitrix.ru/rest_help/users/user_get.php)
:::
<br/>
```bsl title="Code example"
2024-09-24 11:38:18 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
2024-10-15 10:07:27 +03:00
UserID = "624";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.GetUser(URL, UserID);
2024-09-24 11:38:18 +03:00
URL = "b24-ar17wx.bitrix24.by";
2024-10-15 10:07:27 +03:00
Token = "21750a67006e9f06006b12e400000001000...";
UserID = "626";
2024-08-13 16:47:32 +03:00
Result = OPI_Bitrix24.GetUser(URL, UserID, Token);
```
2024-10-15 09:53:37 +03:00
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
"result": [
{
2024-10-09 09:42:00 +03:00
"ID": "606",
"XML_ID": "57980692",
2024-10-06 16:55:08 +03:00
"ACTIVE": true,
"NAME": "Oleg",
"LAST_NAME": "Lama",
2024-10-09 09:42:00 +03:00
"EMAIL": "dd1a6790-a025-49be-90a4-d1cf06f2a89c@exepmple.org",
2024-10-06 16:55:08 +03:00
"LAST_LOGIN": "",
2024-10-09 09:42:00 +03:00
"DATE_REGISTER": "2024-10-09T03:00:00+03:00",
2024-10-06 16:55:08 +03:00
"IS_ONLINE": "N",
"TIMESTAMP_X": {},
"PERSONAL_GENDER": "",
"PERSONAL_BIRTHDAY": "",
"PERSONAL_MOBILE": "88003553535",
"UF_EMPLOYMENT_DATE": "",
"UF_DEPARTMENT": [
7
],
"USER_TYPE": "employee"
}
2024-10-06 16:55:08 +03:00
],
"total": 1,
"time": {
2024-10-09 09:42:00 +03:00
"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
2024-10-06 16:55:08 +03:00
}
}
```