Downloading a file from Yandex.Disk

To download a file from Yandex.Disk:

  1. Download the file from the address you were given, indicating the same OAuth token as in the original request.

Request for a download URL

To get a URL for directly downloading a file, send the API the path on Yandex.Disk where the file to download should be accessible.

Request format

Use the GET method to send the request for a download URL.
 ? path=<path to the file to download>
 & [fields=<properties to include in the response>]
Query parameters
path *

The path to the file to download. For example, %2Fbar%2Fphoto.png

The path in the parameter value should be URL-encoded.


List of JSON keys to include in the response. Keys that are not included in this list will be discarded when forming the response. If the parameter is omitted, the response is returned in full, without discarding anything.

Key names should be comma-separated, and embedded keys should be separated by dots. For example: name, _embedded. items. path.

*  Required

Response format

If the request was processed without errors, the API responds with the code 200 OK. The Link object in the response body returns the generated URL for downloading the file.

If the request caused an error, the relevant response code is returned, and the response body contains the error description.

Sample response:

{  "href": "",  "method": "GET",  "templated": false}
Response elements
Element Description

URL. It may be a URL template; see the templated key.


The HTTP method for requesting the URL from the href key.


Indicates a URL template according to RFC 6570. Possible values:

  • “true” — URL template. Before sending a request to this address, put the desired parameter values in place of the values in curly brackets.
  • “false” — The URL can be requested without changes.

Downloading a file from the given URL

Use the GET method to download a file:

If the request was processed without errors, the API responds with a file with the code 200 OK.