O
O
Optimus2015-09-17 13:18:36
API
Optimus, 2015-09-17 13:18:36

How to make a request to the Yandex.Disk API?

REST API Documentation https://tech.yandex.ru/disk/api/reference/capacity... :

A request for Drive data should be sent using the GET method.
https://cloud-api.yandex.net/v1/disk/

And where to indicate your token? And on the polygon they have in the same method, for example https://tech.yandex.ru/disk/poligon/#!//v1/disk/GetDisk , their token is indicated at the top in the field, and in a real application how to specify it where to get an answer like at the training ground?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-09-17
Pyan @marrk2

https://tech.yandex.ru/disk/api/concepts/quickstar...
It's written right there, at the very bottom. In the form of a header, you need to pass a token.

The resulting token should be passed in the Authorization header on every Drive API call, specifying the type of the token before its value. An example of such a header:
Authorization: OAuth 0c4181a7c2cf4521964a72ff57a34a07
This is how you can pass headers with jQuery.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question