mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-16 11:38:11 +02:00
45 lines
898 B
Markdown
45 lines
898 B
Markdown
---
|
|
sidebar_position: 5
|
|
---
|
|
|
|
# Download file
|
|
Download file from Telegram servers
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
`Function DownloadFile(Val Token, Val FileID) Export`
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|-|-|-|-|
|
|
| Token | --token | String | Token |
|
|
| FileID | --fileid | String | File ID for downloading |
|
|
|
|
|
|
Returns: BinaryData - file's binary data
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
```bsl title="Code example"
|
|
FileID = "AgACAgIAAx0EcNsaZQACE1lmXraQ7CsFNZ2Jrqimp9A0ir3mQQACmtkxG77-sUoMcnd_RvALsgEAAwIAA3MAAzUE";
|
|
Token = "6129457865:AAFyzNYOAFbu...";
|
|
|
|
Result = OPI_Telegram.DownloadFile(Token, FileID);
|
|
```
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
oint telegram DownloadFile --token "6129457865:AAFyzNYOAFbu..." --fileid "AgACAgIAAx0EcNsaZQACE1lmXraQ7CsFNZ2Jrqimp9A0ir3mQQACmtkxG77-sUoMcnd_RvALsgEAAwIAA3MAAzUE"
|
|
|
|
```
|
|
|
|
```json title="Result"
|
|
<Binary file's binary data>
|
|
```
|