Build your own Dropbox Extensions

// By Hannah Choi • Jun 22, 2020

Overview

Imagine you’re working out of your Dropbox and need to edit a cat photo. Now, imagine opening a new tab, navigating to your photo-editing app, uploading the file from Dropbox, editing the photo, and finally saving it back to Dropbox. What if instead you could simply click the file in Dropbox to execute that entire workflow?

Dropbox Extensions are now open to all developers! Give your users an entry point to your app right from Dropbox.

This article will give you a high-level overview of what Dropbox Extensions are and what you need to do to set one up. If you want to jump into the technical guide, head on over to our Extensions Guide for an in-depth explanation.

What are Dropbox Extensions?

In the past, we have released a number of Extensions with our partners to help users launch integration flows directly from Dropbox, such as editing PDFs or requesting eSignatures. We’re now making the Extensions platform available to all so any developer can add Extensions to their Dropbox apps, using the standard OAuth flow and Dropbox’s API v2.

Let’s take a look at how it all works from an end-user’s perspective.

For the user to see your Extension inside their Dropbox to use it, they’ll need to first authorize it via OAuth 2.0. Note that the users will need to start the OAuth flow from your website, just like any other Dropbox apps.

Animation of a file with available extensions in Dropbox
Extensions on a file in Dropbox

Once the user authorizes the app, they’ll see the Extension appear on the Dropbox file, either in the “Open” or “Share” menu, which you can decide in the app’s settings. When a user clicks on your Extension, they’re redirected to your app along with a unique file reference used to interact with the the Dropbox API. At this point, the user will be in your app’s workflow, like editing the cat photo. After your app takes an action on the file, we recommend saving the result back to Dropbox to complete the workflow.

Adding Extensions to Dropbox Apps

Since Dropbox Extensions are a feature of a Dropbox app, you can add it to your existing app or simply create a new app from the App Console. Note that Extensions will only be available for apps with Full Dropbox access and if you’re using a scoped app, you’ll need at least the files.metadata.read scope.

Field to add a new extension in the app settings page
Extensions section of app settings

In this section, you can configure the settings of your Extension such as the Extension URI. This URI is where Dropbox will send the information about the selected file such as file_id. Using this file_id and the access token from the user’s OAuth flow, you can call the Dropbox API endpoints, such as /users/get_current_account  to identify the user and /files/download or /files/get_metadata to get more information about the file the user has selected. If you’re using a scoped app, don’t forget that you’ll need to configure appropriate scopes from the app’s Permissions tab.

If you already have a Full Dropbox access app, you’ll see that you now have the Extension URI section in your app’s Settings tab.

Extensions section on app settings page
Extensions section on app settings page

Once you’ve configured the Extensions section, you’ll see the Extension appear in your own account without the OAuth flow for testing purposes. Once you’ve tested it, you can change the visibility of the Extension so it shows for the users that have authorized the app. Note that if you add Extensions to an existing app, users that have already authorized the app will not be asked to authorize again and see the Extensions show in their Dropbox.

Building your own Dropbox Extensions

With Dropbox Extensions, users can transition into your app directly from the file they’re working on. Our developer guide for Dropbox Extensions has detailed documentation so be sure to check it out when building out an Extensions app. Have feedback or questions? Join the discussion in our community forum!


// Copy link