1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-31 22:05:13 +02:00

43 lines
881 B
Markdown
Raw Normal View History

---
sidebar_position: 5
---
# Download file
Download file from Telegram servers
2024-07-10 13:58:29 +03:00
`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
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-08-13 16:37:03 +03:00
FileID = "CQACAgIAAx0EcNsaZQACGsRmqTObImcQhvZfQC9f7KStfGzIWwACJFYAAjcMSUk5-shFORxZRjUE";
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"
2024-06-09 01:01:18 +03:00
<Binary file's binary data>
```