Answer the question
In order to leave comments, you need to log in
How to correctly issue links for downloading files from Yandex disk using api?
Wrote a script for issuing links to download files from Yandex disk.
$headers = array("Authorization: OAuth 09.......2f.................322f");
$curl = curl_init('https://cloud-api.yandex.net/v1/disk/resources/download?path=/myfile');
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$link = curl_exec($curl);
curl_close($curl);
$link = json_decode($link, true);
Answer the question
In order to leave comments, you need to log in
api.yandex.ru/disk/api/reference/content.xml
read the documentation, right? what is not clear about it?
Because through the API you get links that are not for public download.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question