Kloudless Blog

Kloudless Unified APIs enable you to code once and integrate many

Photo by Samuel Zeller on Unsplash

“If we always helped one another, no one would need luck.”

We’re back with another helpful post centered on helping you overcome some of the most commonly asked questions about the APIs we work with here at Kloudless. Every Monday, we will aim to help answer some of the oft-asked inquiries into the world’s most popular APIs. Today, we will be turning once again to one of the industry’s top names when it comes to file storage: Dropbox.

Boasting more than 500 million users, DropBox has been a bona fide giant of the cloud-based file storage world since its release in 2008. DropBox became the first of the ‘folder sync’ storage applications to become a household name, having been originally conceived when one of its co-founders left his USB flash drive at home and was stuck with no way to access his necessary files for a college class. As a result, DropBox has become ubiquitous with users looking to manage their files and documents in the cloud, and heavily utilized by applications looking to provide their users with storage integrations.

Many of our reader’s questions regarding Dropbox have to do with some of the changes that occurred when Dropbox updated its official API to v2. One issue that was often repeated was the ability to receive metadata from files and folders. In v1, a simple curl request to the /metadata endpoint would respond with the correct file or folder data, but the process has been slightly changed in v2. 

Let’s walk through how to go about receiving the correct metadata!

The Dropbox docs provide all of the necessary information for adding this functionality to your codebase, but we’ll walk through the easy process below in a few short steps. First, keep in mind that there is a limitation to the endpoint: metadata for the root folder is unsupported and can not be retrieved, so make sure you provide a path parameter that isn’t pointed towards the root of your directory.

The endpoint in question is the /get_metadata endpoint. 

There are a few parameters necessary to provide this endpoint, the most important of which is a path param. This path parameter can contain the path to the folder or the associated id or rev of the folder itself. There are additional boolean params required as well, which will all default to false.

A sample curl request to retrieve the metadata of the math folder would look like so, with your access token slotted in where it is missing below:

That’s it! You can now easily retrieve metadata for all files and folders contained inside a user’s Dropbox folder structure. If your organization is considering adding Dropbox functionality in your application, keep in mind the benefits of adding as many file storage providers as possible. If your users are ingrained in another file storage provider like Box, Egnyte, or Google Drive, they may forego your application entirely in search of a competitor that provides the connection to their preferred service. Give your users the choices they need, while bolstering your own application’s functionality, with the use of a Unified API from Kloudless. You can offer your users dozens of file storage services in the same amount of code it would take to connect to a single API. On top of that, when response formats change or APIs update their access endpoints, a Unified API handles all the future maintenance necessary to keep functionality working. To learn more about the Kloudless Unified Storage API, please download our free guide to storage integration strategy today!


Share this article:

Let’s get started. Start building for free today.