Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News Dropbox API v2 Launched for Swift, Python, .NET, and Java

Dropbox API v2 Launched for Swift, Python, .NET, and Java


Dropbox has announced its API v2, which supports four SDKs: Swift, Python, .NET, and Java, is generally available to developers. According to Dropbox, Dropbox API v2 is “simpler, more consistent, and more comprehensive”. Currently, API v2 does not support JavaScript and Objective-C.

Among the changes in Dropbox API v2 is a more extensive use of HTTP POST verb, including for endpoints that return structured data, such as getting the current account’s info, or a file’s metadata:

curl -X POST \
    --header "Authorization: Bearer <access-token>" \
    --header "Content-Type: application/json" \
    --data "null"

curl -X POST \
    --header "Authorization: Bearer <access-token>" \
    --header "Content-Type: application/json" \
    --data "{\"path\": \"/cupcake.png\"}"

All requests take JSON and return JSON structured data in their body. Additionally, a new, non-standard error code has been added to handle requests that fail due to any call-specific reason. In such cases, the API will return a 409 code, which has the advantage, Dropbox say, of not being standard, so it will be relied along by proxies or client libraries.

Dropbox API v2 also introduces new features, such as:

  • File IDs to allows developers to identify a file even if it is moved and can be used as a path replacement.
  • Shared links can be now listed and revoked, while previously it was only possible to create them; furthermore, developers will be allowed to share folders and manage policies and membership/
  • A new API explorer allows developers to test API calls from the browser to discover its features.

A feature which was present in Dropbox API v1 and has not been included yet in v2 is support for range headers in files/download. This is in Dropbox’s plan for prompt inclusion.

As mentioned, Dropbox API v2 does not support Objective-C and JavaScript. Initially, Dropbox stated they had no plan to release an Objective-C version of API v2, thus relying on Objective-C Swift interoperability. On the other hand, it seems that API v2 SDK for Swift is not ready yet to be used from Objective-C due language compatibility issues with Swift structs and enums. On the contrary, JavaScript support is planned but it is still not clear when it will become available.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.