Dropbox is a cloud-based file storage hosting and sharing platform that offers solutions across enterprise and consumer. They have deep integrations with workplace and collaboration platforms and many larger companies use Dropbox to collaborate and share assets. A common query when it comes to using the Dropbox API is how to GET all files from the Dropbox API and how to handle authentication.
We’ll be using Postman to demonstrate how to get Dropbox files via the API.
Getting Files from Dropbox
In order to access Dropbox’s API, you’ll first need a sandbox Dropbox account, as well as an OAuth application to get an access token.
The best way to get both of these is to create a Dropbox developer account.
1. Sign up for a developer account here. Click Create apps to sign up.
2. Once you’re done signing up, navigate here and click Create app.
3. Choose “Scoped access” and “Full Dropbox”, so that your app has access to all files & folders.
4. For this article, we’ll just be showing you how to access the API. So instead of implementing the full OAuth flow, we’ll generate a temporary access token. Click Generate access token to generate an access token. Save the token, as we’ll be using it to make API calls.
And now you’ve set up your developer account as well as an OAuth app!
To get a sandbox Dropbox account, simply sign up for a free account here.
Getting files & folders from Dropbox
1. Create a new collection in Postman. In the Authorization section, select Bearer Token as the type. Copy & paste your access token into Token.
2. At the highest level, Dropbox is organized by namespaces. To access the namespaces, make a call to
3. Before accessing the files in the namespace, you’ll need a user’s account ID. This is required by Dropbox to impersonate a user to access files & folders. Make an API call to
4. To access all files & folders within the namespace, including nested folders & files, you’ll need several things:
a. Make a call to
b. Include Dropbox-API-path_Root in the header, with header value
c. Include Dropbox-API-Select-Admin in the header, with header value equal to any of the admin team_member_id from the previous step.
d. Add the path of the namespace in the path, add 2 parameters:
- <code class="blog_inline-code">path</code> to indicate which folder or namespace to pull from. Here, use the namespace id, and prepend it with “ns:”.
- <code class="blog_inline-code">recursive</code> to indicate whether to get nested files & folders, not just the immediate files & folders under the namespace. Here, set to true.
- The initial API call will most likely not return all files & folders. You’ll have to use cursor-based pagination, and you’ll make a call to
And that wraps up how to get all files & folders in your Dropbox account via API!
Building a production-level integration
There are a few factors to consider when turning this simple POC into a production-level integration:
- You’ll need to implement cursor-based pagination. Dropbox uses a separate endpoint https://api.dropboxapi.com/2/files/list_folder/continue with a provided cursor to output the rest of the response. This is especially important so that you don’t miss any data.
- If you need to do periodic syncs, you’ll also need to implement periodic polling of the Dropbox APIs. You’ll also have to implement rate-limit handling to make sure you don’t exceed Dropbox’s rate limits.
- You’ll need to implement logic to handle the Dropbox OAuth flow, including providing a redirect URI and a bit of front-end support. You’ll be unable to use the expiring access token for production purposes.
This article showed you how to GET all files from Dropbox.
As your integration needs grow, Merge connects your product to hundreds of integrations with one single API in HR, recruiting, accounting, ticketing, CRM, and marketing automation.
Merge is continually expanding into more categories with a File Storage Unified API coming soon! If your organization needs to not only GET files from Dropbox, but also connect via API with vendors like SharePoint, Box, and a slew of others…
Sign up for the waitlist to stay up-to-date and be the first to hear when the Merge File Storage Unified API is released! As with all of Merge’s Unified APIs, one API connection is enough to offer your users integrations to all File Storage platforms.