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 HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
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 "CQACAgIAAx0EcNsaZQACe0ZqXQ7QtQFW4MPaKgWZmbqGHda6ewACgK8AAsZm6Up6lUq2jDUIPj0E"
oint telegram DownloadFile ^
--token "***" ^
--fileid "CQACAgIAAx0EcNsaZQACe0ZqXQ7QtQFW4MPaKgWZmbqGHda6ewACgK8AAsZm6Up6lUq2jDUIPj0E"
Result
"<Binary data>"