Download file
Download file from Telegram servers
- Parameters
- Advanced call ?
Function DownloadFile(Val Token, Val FileID) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| FileID | --fileid | String | ✔ | File ID for downloading |
Returns
BinaryData - file's binary data
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete structure with fields code, body, and headers |
tip
Method at API documentation: getFile
1C:Enterprise/OneScript code example
FileID = "CQACAgIAAx0EcNsaZQACWBFpBJl6nDHeih2m1CcGUJUTUMBewwACt4IAAmBxKUhCDKl_dJD1TjYE";
Token = "6129457865:AAFyzNYOAFbu...";
Result = OPI_Telegram.DownloadFile(Token, FileID);
- Bash
- CMD/Bat
oint telegram DownloadFile \
--token "***" \
--fileid "CQACAgIAAx0EcNsaZQACamtp9d1y7eBlbKvR6bV5anBYm0LkigAC2Z8AAkOVsUuqo4Qr2QjYrTsE"
oint telegram DownloadFile ^
--token "***" ^
--fileid "CQACAgIAAx0EcNsaZQACamtp9d1y7eBlbKvR6bV5anBYm0LkigAC2Z8AAkOVsUuqo4Qr2QjYrTsE"
Result
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…