App folders

Apps can store their own data on the user's Yandex Disk, such as their settings and files. To request access to its folder on Yandex Disk, the app must be registered with the Access to app folder in Yandex Disk permission.

If the app doesn't have permission for general access to Yandex Disk, it can only work with files in its own folder.

Managing app folders

If the user doesn't have a folder for a specific app on their Yandex Disk, the folder will be automatically created on the first request with the appropriate OAuth token. The folder name matches the app name in Yandex OAuth. If such a folder already exists, the app ID is added to the app name, for example, foo_4760142d81bc4b7799476b42b5103713.

All app folders are created in the Apps system directory. Just as for other system folders, the name is set according to the interface language used for the account (for example, for Russian-speaking users, the folder is named Приложения).

Alert

Users have full access to files in the Apps folder, which means they can delete, move, and rename them.

Path to the app folder

To access an app folder, you can use the path format app:/. For example, an app can retrieve a list of resources in its root folder with this request:

https://cloud-api.yandex.net/v1/disk/resources?path=app:/

In API responses, paths are indicated following the disk:/ format, with absolute paths to resources. For example, the Foo app receives the following response about its file photo.png:

{
  "name": "photo.png",
  "created": "2014-04-21T14:57:13+04:00",
  "modified": "2014-04-21T14:57:14+04:00",
  "path": "disk:/Apps/Foo/photo.png",
  "md5": "4334dc6379c8f95ddf11b8508cfea271",
  "type": "file",
  "mime_type": "application/x-www-form-urlencoded",
  "size": 34567
}