Get download link for public object
Gets a direct link to download the public object
- Parameters
- Advanced call ?
Function GetDownloadLinkForPublicObject(Val Token, Val URL, Val Path = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| URL | --url | String | ✔ | Object address |
| Path | --path | String | ✖ | Path inside the object |
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...";
URL = "https://yadi.sk/d/n0QfpfP48V7piQ";
Result = OPI_YandexDisk.GetDownloadLinkForPublicObject(Token, URL);
- Bash
- CMD/Bat
oint yadisk GetDownloadLinkForPublicObject \
--token "***" \
--url "https://yadi.sk/d/B-mJxgwE6rZhdw"
oint yadisk GetDownloadLinkForPublicObject ^
--token "***" ^
--url "https://yadi.sk/d/B-mJxgwE6rZhdw"
Result
{
"method": "GET",
"href": "https://downloader.disk.yandex.ru/disk/133eea02177727d34f29982b5b0f3e224f1419db8ef2972813a9da89aa746...",
"templated": false
}