﻿---
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 | &#x2714; | URL of webhook or a Bitrix24 domain, when token used |
  | UserID | --userid | String, Number | &#x2714; | User ID |
  | Token | --token | String | &#x2716; | 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/1o2...";
    UserID = "656";

    Result = OPI_Bitrix24.GetUser(URL, UserID);

    URL    = "b24-ar17wx.bitrix24.by";
    Token  = "67ac1467006e9f06006b12e400000001000...";
    UserID = "658";

    Result = OPI_Bitrix24.GetUser(URL, UserID, Token);
```
 



```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
 }
}
```
