﻿---
sidebar_position: 2
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get user data
 Gets user data by ID



`Function GetUserData(Val Token, Val UserID) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | UserID | --user | String | &#x2714; | Target user ID |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Notion

<br/>




```bsl title="1C:Enterprise/OneScript code example"
    Token = "secret_9RsfMrRMqZwqp0Zl0B...";
    User  = "ed71865a-9891-46bc-86cd-a92aa499cfdb";

    Result = OPI_Notion.GetUserData(Token, User);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint notion GetUserData \
             --token "***" \
             --user "ed71865a-9891-46bc-86cd-a92aa499cfdb"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint notion GetUserData ^
             --token "***" ^
             --user "ed71865a-9891-46bc-86cd-a92aa499cfdb"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "object": "user",
 "id": "ed71865a-9891-46bc-86cd-a92aa499cfdb",
 "name": "Techno Pizza",
 "avatar_url": null,
 "type": "person",
 "person": {
  "email": "iscript13@gmail.com"
 },
 "request_id": "a6fc9071-fac0-4069-84ba-e724b783d9ce"
}
```
