---
sidebar_position: 5
---
# Download file
Download file from Telegram servers
`Function DownloadFile(Val Token, Val FileID) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| FileID | --fileid | String | File ID for downloading |
Returns: BinaryData - file's binary data
```bsl title="Code example"
FileID = "CQACAgIAAx0EcNsaZQACIzFm-WB2un7AYov-xNbc_geFgGTM_gACbmQAAi3jyUs9kgABMFstY_82BA";
Token = "6129457865:AAFyzNYOAFbu...";
Result = OPI_Telegram.DownloadFile(Token, FileID);
```
```sh title="CLI command example"
oint telegram DownloadFile --token "6129457865:AAFyzNYOAFbu..." --fileid "CQACAgIAAx0EcNsaZQACGsRmqTObImcQhvZfQC9f7KStfGzIWwACJFYAAjcMSUk5-shFORxZRjUE"
```
```json title="Result"
```