2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 1
2025-05-05 11:15:20 +03:00
description: Get current user and other functions to work with Bitrix24 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Get current user
Get current user data
`Function GetCurrentUser(Val URL, Val Token = "") Export`
2024-10-15 15:15:47 +03:00
| 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 |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
2024-11-21 13:27:18 +03:00
Method at API documentation: [user.current](https://dev.1c-bitrix.ru/rest_help/users/user_current.php)
2024-10-15 10:16:04 +03:00
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-10-21 11:36:43 +03:00
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetCurrentUser(URL);
2025-10-21 11:36:43 +03:00
URL = "b24-ar17wx.bitrix24.by";
2025-10-21 21:43:05 +03:00
Token = "0ebbf768006e9f06006b12e400000001000...";
2024-10-15 10:16:04 +03:00
Result = OPI_Bitrix24.GetCurrentUser(URL, Token);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint bitrix24 GetCurrentUser \
2025-10-07 19:27:04 +03:00
--url "b24-ar17wx.bitrix24.by" \
2025-07-05 18:56:59 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint bitrix24 GetCurrentUser ^
2025-10-07 19:27:04 +03:00
--url "b24-ar17wx.bitrix24.by" ^
2025-07-05 18:56:59 +03:00
--token "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"result": {
"ID": "1",
"XML_ID": "53818298",
"ACTIVE": true,
"NAME": "Антон",
"LAST_NAME": "Титовец",
"EMAIL": "no-reply@bitrix24.com",
2025-09-16 09:07:33 +03:00
"LAST_LOGIN": "2025-09-10T07:50:43+00:00",
"DATE_REGISTER": "2024-02-10T00:00:00+00:00",
2025-09-12 20:23:31 +03:00
"TIME_ZONE": "Europe/Moscow",
2024-10-15 10:16:04 +03:00
"IS_ONLINE": "N",
2025-10-15 14:32:00 +03:00
"TIMESTAMP_X": "15.10.2025 13:01:37",
2025-09-12 20:23:31 +03:00
"LAST_ACTIVITY_DATE": "2025-09-10 10:51:58",
2024-10-15 10:16:04 +03:00
"PERSONAL_GENDER": "",
"PERSONAL_BIRTHDAY": "",
"PERSONAL_PHOTO": "https://cdn-ru.bitrix24.by/b28528874/main/d7e/d7e99cf556e4ab676463dae2c00ddfbb/a7e0af6899300e3c684caeca5c334d81.jpg",
"UF_EMPLOYMENT_DATE": "",
"UF_DEPARTMENT": [
1,
2025-09-12 20:23:31 +03:00
638,
2025-10-15 14:32:00 +03:00
2838
2024-10-15 10:16:04 +03:00
]
},
"time": {
2025-10-15 14:32:00 +03:00
"start": 1760522525,
"finish": 1760522525.76715,
"duration": 0.767149925231934,
2025-10-07 19:27:04 +03:00
"processing": 0,
2025-10-15 14:32:00 +03:00
"date_start": "2025-10-15T10:02:05+00:00",
"date_finish": "2025-10-15T10:02:05+00:00",
"operating_reset_at": 1760523125,
2024-10-15 10:16:04 +03:00
"operating": 0
}
}
```