---
sidebar_position: 4
description: Send contact 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';

# Send contact
 Sends a contact with a phone number to a chat or channel



`Function SendContact(Val Token, Val ContactName, Val PhoneNumber, Val UserID, Val SendingToChannel) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | ContactName | --name | String | &#x2714; | Contact name |
  | PhoneNumber | --phone | String | &#x2714; | Phone number |
  | UserID | --user | String, Number | &#x2714; | User ID. For channel > administrator, for bot > recipient |
  | SendingToChannel | --ischannel | Boolean | &#x2714; | Sending to channel or bot chat |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Viber



```bsl title="1C:Enterprise/OneScript code example"
    Name  = "Petr Petrov";
    Phone = "+123456789";

    UserID           = "d3jxe61Z4W73nmNkjYGgZg==";
    Token            = "523b5b25ed27e6ec-fdf013e4...";
    SendingToChannel = False;

    Result = OPI_Viber.SendContact(Token, Name, Phone, UserID, SendingToChannel);

    UserID           = "tMNGhftyUPrB3r1lD+bT4g==";
    Token            = "523b58ba82afffaa-7ef3b426...";
    SendingToChannel = True;

    Result = OPI_Viber.SendContact(Token, Name, Phone, UserID, SendingToChannel);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint viber SendContact \
             --token "***" \
             --name "Petr Petrov" \
             --phone "+123456789" \
             --user "tMNGhftyUPrB3r1lD+bT4g==" \
             --ischannel true
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint viber SendContact ^
             --token "***" ^
             --name "Petr Petrov" ^
             --phone "+123456789" ^
             --user "tMNGhftyUPrB3r1lD+bT4g==" ^
             --ischannel true
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "status": 0,
 "status_message": "ok",
 "message_token": 6024682590964173394,
 "chat_hostname": "SN-CHAT-03_",
 "billing_status": 3
}
```
