Configuration Guide
Configuration Guide
Sugar connects to Dropbox through an app that you create once in the Dropbox Developer Console, and then one Connect to Dropbox click in Sugar. Install the add-on and activate the license first — see the Admin Guide.
1. Create a Dropbox app
Keep Admin > Dropbox Settings open in another tab: you copy the Redirect URI from it.
Create the app
- Open the Dropbox Developer Console, sign in with the Dropbox account Sugar should use and click Create app.
- Choose Scoped access (1).
- Choose App folder (2). Sugar then sees only its own folder,
Apps/, in your Dropbox. Choose Full Dropbox instead if Sugar should see the whole Dropbox. - Enter a name (3), for example Acme Sugar Files. The name may not contain the word "Dropbox".
- Click Create app (4). The first time, Dropbox asks you to agree to its API terms.

Allow reading and writing files
- Open the Permissions tab and tick files.content.write (2) and files.content.read (3). Dropbox ticks files.metadata.read (1) for you.
- Click Save changes (4).

Add the Redirect URI
- Open the Settings tab (1).
- Under OAuth 2 > Redirect URIs, paste the Redirect URI from Sugar's Dropbox Settings (2),
for example
https://crm.example.com/index.php?entryPoint=dropboxOAuth. - Click Add (3), then Add redirect URI to confirm.

Copy the App key and secret
- On the same tab, copy the App key (1).
- Click Reveal app secret and copy the App secret (2).

| In the Dropbox Developer Console | In Sugar Dropbox Settings |
|---|---|
| App key | App key |
| App secret | App secret |
| Generated access token | not needed |
| Allow public clients | not needed |
2. Connect Sugar to Dropbox
Go to Admin > Dropbox Settings. The screen has four steps on the left (Dropbox app, Connect, Uploads and Test), and a setup guide with a direct link to the Developer Console on the right. Fill in the app and the uploads and save them first, then connect and test.
Enter the Dropbox app
- App key: paste the App key (1).
- App secret: paste the App secret (2). It is stored encrypted and never shown again. To replace it later, paste a new one. Leave the box empty to keep the saved one.
- Redirect URI: click Copy (3) to copy the URI you add to the app (step 9 above). If your Sugar site is reached at a different address, open Use a different redirect URI.

Choose where uploads go
- Upload folder: the folder Sugar creates in Dropbox for its files. Default:
SugarCRM. - Organize uploads: where each file goes.
| Option | Example path of a file attached to the account Acme Inc |
|---|---|
| One folder | /SugarCRM/Proposal.pdf |
| By module | /SugarCRM/Accounts/Proposal.pdf |
| By record | /SugarCRM/Accounts/Acme Inc/Proposal.pdf |
With an App folder app, these paths are inside Apps/ in your Dropbox. When a file with the
same name already exists, Dropbox adds a number, for example Proposal (1).pdf.
- Click Save at the bottom of the screen.

Connect
- Click Connect to Dropbox. Dropbox opens in the same window. If you are not signed in, sign in with the Dropbox account Sugar should use.
- Dropbox may first show Before you connect this app…, because the app is your own and not published. Click Continue.
- Click Allow.

Dropbox brings you back to Dropbox Settings. The Connect step shows the connected Dropbox account and its storage, and the badge at the top right shows Connected.
Test
- Click Test Connection. When everything is correct, you see Connected to Dropbox as … with the account name and the storage used (1).

If the test fails, the message tells you what to fix. See Documentation for troubleshooting.
The setup guide on the right of the screen repeats these steps, with buttons that copy the Redirect URI and jump to the App key and App secret fields.
