1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-02 22:05:37 +02:00
Vitaly the Alpaca (bot) df71db738d Main build (Jenkins)
2025-01-27 21:50:57 +03:00

106 lines
2.3 KiB
Plaintext
Vendored

---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get user
Gets user information by ID
`Function GetUser(Val URL, Val UserID, Val Token = "") Export`
| Parameter | CLI option | Type | Required | 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="1C:Enterprise/OneScript code example"
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
UserID = "1464";
Result = OPI_Bitrix24.GetUser(URL, UserID);
URL = "b24-ar17wx.bitrix24.by";
Token = "b4c59767006e9f06006b12e400000001000...";
UserID = "1466";
Result = OPI_Bitrix24.GetUser(URL, UserID, Token);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 GetUser \
--url "b24-ar17wx.bitrix24.by" \
--userid 1430 \
--token "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 GetUser ^
--url "b24-ar17wx.bitrix24.by" ^
--userid 1430 ^
--token "***"
```
</TabItem>
</Tabs>
```json title="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
}
}
```