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/OitH_6Db6ggdRw"
oint yadisk GetDownloadLinkForPublicObject ^
--token "***" ^
--url "https://yadi.sk/d/OitH_6Db6ggdRw"
Result
{
"method": "GET",
"href": "https://downloader.disk.yandex.ru/disk/568d49a0c54a4ba020df00290b8d254175ade0a6da04b6c0165bedc6fe42e939/6a5d3daa/Kdpe3dFisZLPovVA4r-aBmpkby3AOQiLsayEHYapOMw2ylFGSbZZrsWtGPTvHxG_-QDrqSGFBOOsS3b3gKT1zA%3D%3D?uid=0&filename=b00c92b7-db3b-400e-b0d2-accf2e1e2230.png&disposition=attachment&hash=fnR8Xm2jbu7kodgwuclXYcGvYzpqfe1/8jnVkTH4Ya6HG16BlrVRuufgcAUNvNWlq/J6bpmRyOJonT3VoXnDag%3D%3D%3A&limit=0&content_type=multipart&owner_uid=1573541518&fsize=2114023&hid=03d7263840468e281bd0b238a26e7d0d&media_type=image&tknv=v3&is_direct_zip_experiment=1",
"templated": false
}