---
sidebar_position: 3
description: Get user data and other functions to work with Viber in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Viber]
---

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

# Get user data
 Gets user information by ID



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

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | UserID | --user | String, Number | &#x2714; | Viber User ID |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Viber



```bsl title="1C:Enterprise/OneScript code example"
    Token  = "523b58ba82afffaa-7ef3b426...";
    UserID = "tMNGhftyUPrB3r1lD+bT4g==";

    Result = OPI_Viber.GetUserData(Token, UserID);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint viber GetUserData \
             --token "***" \
             --user "tMNGhftyUPrB3r1lD+bT4g=="
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint viber GetUserData ^
             --token "***" ^
             --user "tMNGhftyUPrB3r1lD+bT4g=="
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "status": 6,
 "status_message": "notSubscribed",
 "chat_hostname": "SN-CHAT-04_"
}
```
