Skip to main content

Prepare Dropbox connector

The Dropbox connector retrieves information about users and user activity. In Dropbox developers console, you are required to create an app and give permissions to it, request a refresh token, copy App key and App secret, and enter them in Settings when adding the connector.

Prerequisites

A Dropbox Business admin account is required to connect to the Dropbox API.

Procedure

  1. Sign in to the Dropbox developers console with an admin account: https://www.dropbox.com/developers/apps

  2. Create an app.

    1. In My apps, select Create app.

    2. In the Create a new app on the DBX Platform view, in Choose an API, select Scooped access.

    3. In Choose the type of access you need, select Full Dropbox - Access to all files and folders in a user's Dropbox.

    4. In Name your app, enter a unique name for your app.

    5. Select Create app.

  3. Set permissions for your app.

    1. Go to the Permissions tab and select the following options, if not already selected:

      • account_info.read

      • team_info.read

      • members.read

      • sessions.list

    2. Select Submit.

    tip

    There may be a bug in Dropbox, so that you first have to select the three last permissions, then clear account_info.read, and then submit. The account_info.read gets automatically selected again when you refresh the page, and the permissions should work.

  4. On the Settings tab of your app, copy and save the values in App key and App secret.

    They are used in the following steps, and when adding the connector in Step 8.

  5. Generate an access code with OAuth2.

    1. In the browser where you are signed in to Dropbox developer console, paste the URL below and replace {APP_KEY} with the copied App key value.

      https://www.dropbox.com/oauth2/authorize?client_id={APP_KEY}&response_type=code&token_access_type=offline
    2. Press Enter.

      An OAuth2 process starts.

    3. Select Continue, and then Allow.

    4. Copy the generated access code and save it for use in Step 7.i.

  6. Encode the App key and App secret into Base64 string format.

    1. Depending on your platform, do one of the following:

      • In Windows, using the Microsoft PowerShell command line, run the following commands:

        Replace {APP_KEY} and {APP_SECRET} with the saved App key and App secret values respectively.

        [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes('{APP_KEY}:{APP_SECRET}'))
      • In macOS Terminal or a command line in Unix, run the following command:

        Replace {APP_KEY} and {APP_SECRET} with the saved App key and App secret values respectively.

        echo -n "{APP_KEY}:{APP_SECRET}" | base64
    2. Copy and save the returned, encoded value for use in Step 7.i.

  7. Request a refresh token using the encoded value and the access code.

    1. Depending on your platform, do one of the following:

      • In Windows, using the Microsoft PowerShell command line, run the following commands separately:

        $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
        $headers.Add("Content-Type", "application/x-www-form-urlencoded")

        Replace {BASE64} with the encoded value from Step 6.ii.

        $headers.Add("Authorization", "Basic {BASE64}")

        Replace {CODE} with the access code saved in Step 5.iv.

        $body = "code={CODE}&grant_type=authorization_code"
        $response = Invoke-RestMethod 'https://api.dropboxapi.com/oauth2/token' -Method 'POST' -Headers $headers -Body $body
        $response | ConvertTo-Json
      • In macOS Terminal or a command line in Unix, run the following command:

        Replace {BASE64} with the encoded value saved in Step 6.ii.

        Replace {CODE} with the access code saved in in Step 5.iv.

        $ curl --request POST 'https://api.dropboxapi.com/oauth2/token' \
        --header 'Content-Type: application/x-www-form-urlencoded' \
        --header 'Authorization: Basic {BASE64}' \
        --data-urlencode 'code={CODE}' \
        --data-urlencode 'grant_type=authorization_code'
    2. Copy and save the refresh token value in the returned JSON response. It is used when adding the connector in Step 8.

  8. When adding the connector in Snow Atlas, in Settings, enter the saved values in App key, App secret, and Refresh token.

After completing this task, follow the general procedure to Add connectors.

The connector makes API calls to the vendor and retrieves data. For more information, see API calls and Data retrieved by the connector.


Flexera does not own the third party trademarks, software, products, or tools (collectively, the "Third Party Products") referenced herein. Third Party Product updates, including user interface updates, may not be reflected in this content.