Token permissions
Which permissions a token can have and which combination an upload needs.
On this page
The Permissions field of a token has two kinds of entries:
| Entry | Colour | Meaning |
|---|---|---|
| Upload files | red | The token may upload. |
| Remove files | red | Not used by the upload API. |
| A storage name, for example photos | blue | The storage the token may work with. |
Every storage you create appears in the list as a blue entry.
What an upload needs
To upload to a storage, a token needs both:
- Upload files, and
- the name of that storage.
For example, a token with Upload files and photos can upload to /upload/photos/. The same token gets Not allowed when it tries /upload/documents/.
| Permissions | /upload/photos/ | /upload/documents/ |
|---|---|---|
| Upload files, photos | allowed | Not allowed |
| Upload files, photos, documents | allowed | allowed |
| photos only | Not allowed | Not allowed |
Good practice
- Give each app only the storages it needs.
- Use a separate token for a web page that uploads directly from the browser, because its visitors can read the token. See Upload from a web page.
See Errors and limits for the answers your app gets.