﻿---
sidebar_position: 11
description: Download file 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';

# Download file
 Downloads a file by the specified path or ID



`Function DownloadFile(Val Token, Val Path) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token |
  | Path | --path | String | &#x2714; | Path or ID of the file |

  
  Returns:  BinaryData - binary data of the file

<br/>




```bsl title="1C:Enterprise/OneScript code example"
    Token = "sl.u.AF6TUJY99kQGPaL42fiAlTqiSXFFkcFy_JI4IywuqbJWWJLt_8EkHrGrO5nUfc87VkF4OYiEUw3pfWdUWxoMbpR9Wr_zXkvnNuJnd5_YnSBexWpntYlROt_CghzDjBJi9zz-iiCXGEp5taE7dq9_SBR2LN_2aFkr0pMb-ygSoV_2ynL75B4pr2bPZjlTOAL_c-EuthqJPTl_5EB-rq-q1O4w1ukNN_Ii-l9COn9kSPMkKPaZeWybauk0kYOkXxy_yKUGy5a27TsKR9jjLc80pKNEgo-mLTnxSmnxN7LH8tESdbABdOTfLJvZt13d-xEg9vvSKC6smcpZSGlRYMihHFgy20bEd0GN0uxHT0LWzYd-bH-GhfconoCUyDkFOwi180BJ90SM3462vstnsvXQ0U_XMHB-jB-j7JlkP62b7FcZ3JJSFRJ4cWuqqvqNO-_TYVKr7GaQdpTPQFgBMBCG6l4FI59QDqdgfdZ8LHrSXcP1pzCt8SrzZSWesFYYOj9odK9oU6V_Ul63-37MX9GH9ebDSQV8U5F3gsrvq4UIiCfnJaLn0d-04DZ5JmL4jONXdJnTh1d9-BsEXQ1cFJCnEPnf_PORK7rGW5K00DJsTHJd5Qlr1mfjAnUCF4iP8w4HkrgwKg8Uc5eeJSCKngVhCq_jWuRtvDaBuXiFNRwFzfG2pylnsbUceukTPk_rLgm-WEeAOAkzB4ZfRyKt2hrk5f0qvRSlB4-...";
    Path  = "/New/pic.png";

    Result = OPI_Dropbox.DownloadFile(Token, Path);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint dropbox DownloadFile \
             --token "***" \
             --path "/New/pic.png"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint dropbox DownloadFile ^
             --token "***" ^
             --path "/New/pic.png"
        ```
    </TabItem>
</Tabs>


```json title="Result"
NOT JSON: FF D8 FF E1 54 C1 45 78 69 66 00 00 49 49 2A 00 08 00 00 00 0B 00 0E 01 02 00 20 00 00 00 92 00 00 00 0F 01 02 00 05 00 00 00 B2 00 00 00 10 01 02 00 07 00 00 00 B8 00 00 00 12 01 03 00 01 00…
```
