The New Dropbox API v2…what does it REALLY mean for you?

It has been almost one month since Dropbox allowed us a sneak peak of the work-in-progress for v2 of their API.

While the preview was all bells and whistles, the overall offering (for developers anyway) is less about fuss and more about simplicity. In their words, they want to make it easier for “developers to build apps and to create SDKs.”

That is all well and good, but what impact will its v2 REALLY have on our project(s)? Integration is the obvious answer.

Like all API providers, Dropbox is simply upping the ante to ensure its API can be easily embedded into users’ ecosystems and to simplify integration of its service. Easy integration and simple code, as we at Filestack know, is the only way to quickly and easily build great apps now.

 

What’s new that will Dropbox Sync API impact you?

Thankfully, the Datastore and Sync APIs have been deprecated in a bid to move developers to its Core API. The Sync API and SDK caused many headaches for developers, with many (accidentally) opting for Core for when they should have chosen Sync and vice versa. In v2, Dropbox will offer more syncing features, while a single solution should (hopefully) simplify development.

The Datastore API – created to support syncing of structured (nonfile) data – has not lived up to Dropbox’s aspirations in terms of adoption. The new version will thankfully sort this issue out for us.

All new Dropbox apps will use the Core API, while existing apps that use the Sync and Datastore APIs have some time to make the transition.

Dropbox will support both APIs and implement bug fixes through to October 23, 2015. As the Core API powers the Sync SDK, existing apps utilizing Sync will continue to work. But bug fixes will cease. Datastore bug fixes will end in six months, while Datastore endpoints will remain available through to April 2016.

In v2, they have also simplified its use of HTTP and the use of HTTP status codes for errors.

Why now?

Well, Dropbox has been enjoying a rapid boost in numbers of late. In the latest number count in May 2014, they hit a record 300m users. But it’s the fact that they earned 100m extra users within a six-month period to get this figure that perhaps kickstarted the rollout of v2 of its API.

Having a Dropbox application within apps to allow users to grab their files easily is now a must-have, and no longer an additional “special feature.” And this will especially be the case with Dropbox’s launch of Carousel, its photo and video archive and sharing platform.

Try it Out… 

Dropbox are allowing users to test endpoints of the new version. You will need an OAuth 2 access token to make API calls. If you don’t have one already, you can generate one for your own account here. (Do remember this is all in beta form and things may change. Don’t use the endpoints in production yet!)

To make the API calls, here are some options;

  • Use Dropbox Python REPL script.
  • Use the Paw REST client app for Mac with new Paw configuration file. Replace “ACCESS_TOKEN” with your generated access token.
  • Use whatever you want – it’s just HTTP.

 3 Categories of Endpoints:

  1. RPC-Style: The request and response bodies are both JSON
  2. Upload-Style: The request has JSON in the Dropbox-API-Arg header and bulk binary data in the body. The response body is JSON
  3. Download-Style: The request uses the GET method and has JSON in the Dropbox-API-Arg header and nothing in the body. The response has JSON in the Dropbox-API-Result header and bulk binary data in the body

Example of RPC-Style: files/list_folder

Sample Request:

Sample Response:

 

 

 

Read More →