1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-16 11:38:11 +02:00
OpenIntegrations/docs/en/md/Yandex_Disk/File-and-folder-management/Get-download-link.md

47 lines
1.3 KiB
Markdown
Raw Normal View History

---
sidebar_position: 6
---
# Get download link
Gets a download link for the file
2024-07-10 12:58:29 +02:00
`Function GetDownloadLink(Val Token, Val Path) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| Path | --path | String | Path to the file for downloading |
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
2024-07-10 13:05:58 +02:00
<br/>
2024-07-10 12:58:29 +02:00
```bsl title="Code example"
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
2024-08-20 12:11:21 +02:00
Path = "/adcad259-548f-4a77-870b-30b0711cba00.png";
Result = OPI_YandexDisk.GetDownloadLink(Token, Path);
```
```sh title="CLI command example"
oint yadisk GetDownloadLink --token "y0_AgAAAABdylaOAA..." --path "/Alpaca.png"
```
```json title="Result"
2024-08-14 08:06:31 +02:00
{
"templated": false,
"method": "GET",
"href": "https://downloader.disk.yandex.ru/disk/5e035e14f3580573be69477a0a5a41a598227875d7c471604e386ee2dcfc7067/65c62a93/gwThwhLBKYvLhQCNnqAHis09lIY3JS6kMxocI4drJ-uZelc6zzgdG8REX8G87z9KG45VhprQarmCtb_OEKbojQ%3D%3D?uid=1573541518&filename=%D0%90%D0%BB%D1%8C%D0%BF%D0%B0%D0%BA%D0%B0.png&disposition=attachment&hash=&limit=0&content_type=image%2Fpng&owner_uid=1573541518&fsize=440431&hid=0e9b208e1aea0dbd58b4b43ccdc3ad5a&media_type=image&tknv=v2&etag=8d7bf7d7ee61113f9044f3a28496e458"
}
```