Getting Started with the Dropbox API

Learn how to sign up and create an application to use the Dropbox API.

In this lesson, we’ll look at the sign-up process for Dropbox and how to create an application that will communicate with a Dropbox account.

First of all, we’ll start by creating an account on Dropbox. Feel free to use an existing Dropbox account if you have one. If you don’t, visit the Dropbox Registration Page to create a new account.

Note: You can also use the Dropbox desktop application to monitor changes. We don’t require the installation of Node.js on Educative’s platform, but you’ll need to install it if you want to try using the Dropbox API on your local machine.

Create a Dropbox application

Let’s create an application so we can start to use the Dropbox API.

  1. First, visit the Dropbox developer portal and click “Create apps.” This link will redirect us to creating a new application wizard.
  2. We’ll see a couple of options, as shown in the second slide below.
  3. The first option is “Choose an API.” Let’s select “Scoped access.”
  4. After that, “Choose the type of access you need” will expand. Select the “Full Dropbox” option.
  5. The “Name your app” section will expand, allowing us to give our application a name of our choosing.
  6. Click the “Create apps” button at the end.

After we have created our application, the App Console page will appear. Here, we have all the information related to our application. We’ll then grant permissions to our application so it can communicate with Dropbox without any restrictions.

Follow the steps below to grant permissions:

  1. Navigate to the “Permissions” tab in the App Console.
  2. Check all permissions under “Individual Scopes.”
  3. Click “Submit” at the bottom of the page.

Now that we’ve given permissions to our application, let’s explore some of the important properties of the “Settings” tab:

  • Status tells us the current status of our application. By default, the status is “Development,” which limits access to our application. It can also be set as “Production.”
  • Permission type provides information about the permissions granted for our application. We selected “Scoped access” when we created our example application, so we’ll see “Scoped App” as the permission type. If we also select “App folder” as the access type, we’ll see “Scoped App (App Folder)” here instead.
  • App key/App secret are unique identifiers for our application used for authorization purposes.
  • Generate access token is an API token used to authorize API calls to the endpoints. Click the “Generate” button, as shown in the image below, to get the access token.
Press + to interact
Click the "Generate" button to get the access token
Click the "Generate" button to get the access token

Note: The above-generated token is temporary. We’ll be required to generate a new token every four hours from here.

Verify the API key

Click “Edit” in the code widget below and paste the access token in the TOKEN field.

Press + to interact
//Verify the Token
verifyToken('{{TOKEN}}');