Yandex Disk API PHP example

Yandex.Disk is a service for storing files on remote Yandex servers and sharing them with others. Data can be accessed by logging in from any device connected to the internet.

Yandex.Disk API allows software developers to access personal files and upload data to the cloud from any device. REST API uses HTTP requests to synchronize data in Yandex.Disk between different devices and platforms.

You can download and upload files to your cloud storage space on Yandex.Disk via the REST API commands. First you need to start by getting an OAuth access token for your App. You can evaluate the Yandex.Disk API using the convenient interface to send requests via Sandbox

Yandex Disk API PHP example


How to get an Yandex OAuth token?

1) Add a new application to the Yandex OAuth server.

2) Give your app a name. For example: "My web appliction"

3) In order for your application to be used with PHP, check the "Web services" box.

4) Click "Set URL for development" for "Callback URI #1:"
Yandex Disk API PHP example

5) Check the boxes under "Yandex.Disk REST API" for the permissions required by your application.
Yandex Disk API PHP example

6) Click the "Create App" button.
Yandex Disk API PHP example

7) Replace "c0XXXXXXXXXXXXXXXXXXXXXXXXXXXX00" with your "ID" number in the link address below. Open this link address with the browser in which you are logged in to Yandex.

https://oauth.yandex.com/authorize?response_type=token&client_id=c0XXXXXXXXXXXXXXXXXXXXXXXXXXXX00


Done! Here is your token string:

Yandex Disk API PHP example


Use my Github code:

GitHub Yandex.Disk PHP
Share:

0 comments:

Post a Comment

ⓘ Comment is published after moderation.


Subscribe to: Post Comments (Atom)