Skip to main content

Get download link for public object

Gets a direct link to download the public object

Function GetDownloadLinkForPublicObject(Val Token, Val URL, Val Path = "") Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
URL--urlStringObject address
Path--pathStringPath inside the object

Returns: Map Of KeyAndValue - serialized JSON response from Yandex


1C:Enterprise/OneScript code example
    Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
URL = "https://yadi.sk/i/j-_3tLvQmEDObQ";

Result = OPI_YandexDisk.GetDownloadLinkForPublicObject(Token, URL);
    oint yadisk GetDownloadLinkForPublicObject \
--token "***" \
--url "https://yadi.sk/i/eaR1_77Ys2cKVA"
Result
{
"method": "GET",
"href": "https://downloader.disk.yandex.ru/disk/181ae8a5ffb976fec84f771f92c936e35c722f33c9cf4056ba1e5b1386ccfbc1/68c8cb06/gwThwhLBKYvLhQCNnqAHipg9dL32B8ucsRJtTnFcQwXyscfbJ8B8OyXfwGYeSiPiSjoRHIEODK4QYbBUqVd5IQ%3D%3D?uid=0&filename=910d6b9e-4c3a-4e22-9b10-7f1fc99187ba.png&disposition=attachment&hash=j%2B7zGX0f44gDmuOh2ni0CqorYZWol0bBTg1Pk4ROX505kD5l5Vc%2BdGx099iaa5ksq/J6bpmRyOJonT3VoXnDag%3D%3D%3A&limit=0&content_type=multipart&owner_uid=1573541518&fsize=2114023&hid=03d7263840468e281bd0b238a26e7d0d&media_type=image&tknv=v3",
"templated": false
}