

Use URL parameters arg and authorization instead of HTTP headers Dropbox-API-Arg and Authorization.You can avoid the extra round-trip by ensuring your request meets the CORS definition of a "simple cross-site request". When browser-based JavaScript code makes a cross-site HTTP request, the browser must sometimes send a "pre-flight" check to make sure the server allows cross-site requests. Browser-based JavaScript and CORS pre-flight requests These endpoints also support HTTP GET along with ETag-based caching ( If-None-Match) and HTTP range requests.įor information on how to properly encode the JSON, see the JSON encoding page. The response body contains file content, so the result will appear as JSON in the Dropbox-API-Result response header. Content-download endpointsĪs with content-upload endpoints, arguments are passed in the Dropbox-API-Arg request header or arg URL parameter. These endpoints accept file content in the request body, so their arguments are instead passed as JSON in the Dropbox-API-Arg request header or arg URL parameter.

These endpoints accept arguments as JSON in the request body and return results as JSON in the response body. For example, the following is not allowed for a WriteMode, as update is not a Void member: "mode": "update". This shorthand is not allowed for non- Void members. For example, when supplying a WriteMode, you can supply just "mode": "add" instead of "mode". When specifying a Void member of a union, you may supply just the member string in place of the entire tagged union object. tag field in an object identifies the subtype of a struct or selected member of a union. Request authentication is via OAuth 2.0 using the Authorization request header or authorization URL parameter. In general, the Dropbox API uses HTTP POST requests with JSON arguments and JSON responses. The Dropbox API explorer is the easiest way to get started making API calls. The Dropbox API allows developers to work with files in Dropbox, including advanced functionality like full-text search, thumbnails, and sharing.
