How to Create a Dropbox Application

Before you begin

Before starting, you'll need a Dropbox account.

Create a Dropbox application

  1. Go to the Dropbox App Console, and click Create app.

  2. Choose the appropriate API (e.g., "Scoped Access") and the type of access your app needs ("Full Dropbox" or "App Folder"), name your app, then click Create app.

  3. After creating the app, you'll be taken to the app's settings page where you'll find your App Key and App Secret. Securely save and store both. You'll need these to generate your app's refresh token, and to create your connector in Vectorize.

  4. Enter a Redirect URI, then click Add. This is the URL in your application where Dropbox will redirect after the user authorizes the app.

  5. Go to the Permissions tab, and grant your app both files.metadata.read and files.content.read permissions. This will allow it to view information about/content in your files and folders. Click Submit to save your changes.

Get the App's Authorization Token

  1. Enter the Dropbox authorization URL in your browser, replacing APP_KEY with your application's key, and REDIRECT_URI with the redirect URI you set up in your app.

    https://www.dropbox.com/oauth2/authorize?client_id=APP_KEY&response_type=code&token_access_type=offline&redirect_uri=REDIRECT_URI
  2. You'll be prompted to authorize your application. Once you do so, Dropbox will redirect you to your redirect_uri with an authorization code in the query parameters. You'll use this authorization code in the next step.

Exchange the Authorization Code for an Access and Refresh Token

  1. Make a POST request to Dropbox's token endpoint to exchange the authorization code for an access token and refresh token.

    Example using curl:

    curl -X POST https://api.dropbox.com/oauth2/token \
        -d code=AUTHORIZATION_CODE \
        -d grant_type=authorization_code \
        -d client_id=APP_KEY \
        -d client_secret=APP_SECRET \
        -d redirect_uri=REDIRECT_URI

    Where:

    • code: The authorization code you received in the previous step.

    • client_id: Your app key.

    • client_secret: Your app secret.

    • redirect_uri: Must match the one used to get the authorization code.

  2. Retrieve and securely save the refresh token from the response. Example Response:

    {
        "access_token": "YOUR_ACCESS_TOKEN",
        "token_type": "bearer",
        "expires_in": 14400,
        "refresh_token": "YOUR_REFRESH_TOKEN",
        "scope": "account_info.read",
        "uid": "user_id",
        "account_id": "YOUR_ACCOUNT_ID"
    }

Next Step: Configure your Dropbox Connector

You now have everything you need to configure a Dropbox connector.

Last updated