---
sidebar_position: 1
description: Get confirmation code and other functions to work with Yandex Disk 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, Yandex Disk]
---

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

# Get confirmation code
 Gets the confirmation code and the address of the page where it needs to be entered



`Function GetConfirmationCode(Val ClientId) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | ClientId | --id | String | &#x2714; | Client id |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Yandex



```bsl title="1C:Enterprise/OneScript code example"
    ClientID = "cc2ce9d60deb4975be58866d32dbe7aa";

    Result = OPI_YandexDisk.GetConfirmationCode(ClientID);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint yadisk GetConfirmationCode \
             --id "cc2ce9d60deb4975be58866d32dbe7aa"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint yadisk GetConfirmationCode ^
             --id "cc2ce9d60deb4975be58866d32dbe7aa"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "device_code": "2e0c41e6728a443e91d8e26c3a0a9882",
 "expires_in": 300,
 "interval": 5,
 "user_code": "4lclxi6o",
 "verification_url": "https://ya.ru/device"
}
```
