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 "/0601a5f5-c489-46fb-a52c-4fb04dc129d6.png"
oint yadisk GetDownloadLink ^
--token "***" ^
--path "/0601a5f5-c489-46fb-a52c-4fb04dc129d6.png"
Result
{
"method": "GET",
"href": "https://downloader.disk.yandex.ru/disk/e339de9c587aaa9e16cfe6e3f9d3f8506cbf64b85e4999d477c430bc423f5d3e/6a5d3d38/Kdpe3dFisZLPovVA4r-aBmpkby3AOQiLsayEHYapOMw2ylFGSbZZrsWtGPTvHxG_-QDrqSGFBOOsS3b3gKT1zA%3D%3D?uid=1573541518&filename=b38285e0-1db8-431a-b44c-3cbf0e34c4c1.png&disposition=attachment&hash=&limit=0&content_type=multipart&owner_uid=1573541518&fsize=2114023&hid=03d7263840468e281bd0b238a26e7d0d&media_type=image&tknv=v3&is_direct_zip_experiment=1&etag=9e0176f87f6565a22f78e0f9b39a4d78",
"templated": false
}