Resources »

Guides »

Integrations »

Dropbox »

Cerb + Dropbox

Introduction

In this guide we’ll walk through the process of linking Cerb to Dropbox. You’ll be able to use Dropbox’s full API from bots in Cerb to automate whatever you need.

Create an app at Dropbox

First, you need to create a new app on Dropbox for Cerb to connect to.

  1. Open https://www.dropbox.com/developers/apps and sign in.

  2. In the top right, click Create app.
  3. Select Dropbox API.

  4. Select the folders you want Cerb to be able to access.

  5. Name your app (e.g. “Cerb”).

  6. Agree to the Dropbox API terms and conditions.

  7. Click the blue Create app button.

  8. Configure your OAuth 2 Redirect URIs:
  
  https://YOUR-CERB-HOST/oauth/callback
  
  

Make a note of your App key and App secret for the next step.

Create the Dropbox service in Cerb

  1. Navigate to Setup » Configure » Import Package.

  2. Paste the following package:

     
    	
     {
       "package": {
         "name": "Dropbox Connected Service",
         "revision": 1,
         "requires": {
           "cerb_version": "9.1.0",
           "plugins": []
         },
         "configure": {
           "placeholders": [],
           "prompts": [
             {
               "type": "text",
               "label": "Client ID",
               "key": "prompt_client_id",
               "params": {
                 "default": "",
                 "placeholder": "(paste your Client ID)"
               }
             },
             {
               "type": "text",
               "label": "Client Secret",
               "key": "prompt_client_secret",
               "params": {
                 "default": "",
                 "placeholder": "(paste your Client Secret)"
               }
             }
           ]
         }
       },
       "records": [
         {
           "uid": "service_dropbox",
           "_context": "connected_service",
           "name": "Dropbox",
           "extension_id": "cerb.service.provider.oauth2",
           "params": {
             "grant_type": "authorization_code",
             "client_id": "{{{prompt_client_id}}}",
             "client_secret": "{{{prompt_client_secret}}}",
             "authorization_url": "https://www.dropbox.com/oauth2/authorize",
             "access_token_url": "https://api.dropboxapi.com/oauth2/token",
             "resource_owner_url": "",
             "scope": "",
             "approval_prompt": ""
           }
         },
         {
           "uid": "account_dropbox",
           "_context": "connected_account",
           "name": "Dropbox",
           "service_id": "{{{uid.service_dropbox}}}",
           "owner__context": "cerberusweb.contexts.app",
           "owner_id": "0",
           "params": {}
         }
       ]
     }
    	
     
     
  3. Click the Import button.

  4. Enter your client ID and secret from Dropbox.

  5. Click the Import button again.

Link the connected account to Dropbox in Cerb

  1. Click on the Dropbox bubble in the Connected Accounts section after importing the above package.

  2. Click on the Edit button in the card popup.

  3. Click the blue Link to Dropbox button.

  4. Accept consent on Dropbox.

  5. Click the Save Changes button.

Use the connected account in bot behaviors

You can use the connected account you just created to access Dropbox’s API from bot behaviors in Cerb. This is typically accomplished using the Execute HTTP Request action from a bot, and selecting the connected account in the Authentication: section.

You can import the Dropbox Bot package for a working example.