---
sidebar_position: 2
description: Get token and other functions to work with Dropbox 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, Dropbox]
---

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

# Get token
 Gets token based on the code from the GetAuthorizationLink page



`Function GetToken(Val AppKey, Val AppSecret, Val Code) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | AppKey | --appkey | String | &#x2714; | Application key |
  | AppSecret | --appsecret | String | &#x2714; | Application secret |
  | Code | --code | String | &#x2714; | Code from the authorization page |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Dropbox



```bsl title="1C:Enterprise/OneScript code example"
    AppKey    = "oynqxds...";
    AppSecret = "tk2oewn...";
    Code      = "bTCiUTzxe6kAAAAAAAAAGN1NMZIxyqETKr4o7OS2dU8";

    Result = OPI_Dropbox.GetToken(AppKey, AppSecret, Code);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint dropbox GetToken \
             --appkey "***" \
             --appsecret "***" \
             --code "bTCiUTzxe6kAAAAAAAAAGN1NMZIxyqETKr4o7OS2dU8"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint dropbox GetToken ^
             --appkey "***" ^
             --appsecret "***" ^
             --code "bTCiUTzxe6kAAAAAAAAAGN1NMZIxyqETKr4o7OS2dU8"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
  "error": "invalid_grant",
  "error_description": "code doesn't exist or has expired"
  }
```
