Get download link
Gets a download link for the file
- Parameters
- Advanced call ?
Function GetDownloadLink(Val Token, Val Path) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| Path | --path | String | ✔ | Path to the file for downloading |
Returns
Map Of KeyAndValue - serialized JSON response from Yandex
| 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) |
1C:Enterprise/OneScript code example
Token = "y0__xCOranuBRj1uTsgs8z_iRV...";
Path = "/c20d5eca-8524-41ce-aa92-521e71dd6b17.png";
Result = OPI_YandexDisk.GetDownloadLink(Token, Path);
- Bash
- CMD/Bat
oint yadisk GetDownloadLink \
--token "***" \
--path "/184819cb-cf2b-42c0-91e5-2748a6b5801e.png"
oint yadisk GetDownloadLink ^
--token "***" ^
--path "/184819cb-cf2b-42c0-91e5-2748a6b5801e.png"
Result
{
"method": "GET",
"href": "https://downloader.disk.yandex.ru/disk/fdcb95d3a118d09994b4d7d2e25b69a6f5c287640924f3ba68cc2d2ef4502...",
"templated": false
}