1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-25 12:24:39 +02:00

43 lines
1.0 KiB
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-10-04 13:35:56 +03:00
FileID = "AgACAgIAAxkDAAIfmWb-MR8PQhrvZHiqLmG6UdiAAznzAALj5DEb1I7wSxB3bmqDIveAAQADAgADcwADNgQ";
2024-09-24 11:38:18 +03:00
Token = "6129457865:AAFyzNYOAFbu...";
2024-08-13 16:47:32 +03:00
Result = OPI_Telegram.DownloadFile(Token, FileID);
```
```sh title="CLI command example"
oint telegram DownloadFile --token "6129457865:AAFyzNYOAFbu..." --fileid "CQACAgIAAx0EcNsaZQACGsRmqTObImcQhvZfQC9f7KStfGzIWwACJFYAAjcMSUk5-shFORxZRjUE"
```
```json title="Result"
2024-10-06 16:55:08 +03:00
NOT JSON: 49 44 33 03 00 00 00 05 1F 76 54 49 54 32 00 00 00 0B 00 00 01 FF FE 44 00 6F 00 67 00 73 00 54 50 45 31 00 00 00 15 00 00 01 FF FE 4D 00 6F 00 74 00 6F 00 72 00 68 00 65 00 61 00 64 00 54 59…
```