2.8 KiB
Setting up Dropbox Integration
This guide explains how to set up the Dropbox integration for DocuNova.
Required Configuration Parameters
| Variable | Description |
|---|---|
DROPBOX_APP_KEY |
Dropbox API app key |
DROPBOX_APP_SECRET |
Dropbox API app secret |
DROPBOX_REFRESH_TOKEN |
OAuth2 refresh token for Dropbox |
DROPBOX_FOLDER |
Default folder path for Dropbox uploads |
For a complete list of configuration options, see the Configuration Guide.
Step-by-Step Setup Instructions
1. Create a Dropbox App
- Go to the Dropbox Developer Apps Console
- Click "Create app"
- Select "Scoped access" for API
- Choose "Full Dropbox" access (or "App folder" for more restricted access)
- Give your app a name (e.g., "DocuNova")
- Click "Create app"
2. Configure App Permissions
- In your app's settings page, go to the "Permissions" tab
- Enable the following permissions:
files.content.write(to upload files)files.content.read(if you need to read file content)
- Click "Submit" to save changes
3. Get App Key and Secret
- On your app's settings page, find the "App key" and "App secret"
- Set these as
DROPBOX_APP_KEYandDROPBOX_APP_SECRETin your configuration
4. Generate a Refresh Token
-
Go to the "OAuth 2" tab in your app settings
-
Add a redirect URI:
http://localhost(this is for the authorization flow) -
Generate an authorization URL with these instructions:
https://www.dropbox.com/oauth2/authorize?client_id=YOUR_APP_KEY&response_type=code&token_access_type=offline -
Replace
YOUR_APP_KEYwith your app key -
Open this URL in your browser
-
Authorize the app when prompted
-
You'll be redirected to
localhostwith a code parameter in the URL -
Copy this code parameter
5. Exchange the Code for a Refresh Token
-
Use this curl command to exchange the code for tokens:
curl -X POST https://api.dropboxapi.com/oauth2/token \ -d code=YOUR_AUTH_CODE \ -d grant_type=authorization_code \ -d client_id=YOUR_APP_KEY \ -d client_secret=YOUR_APP_SECRET \ -d redirect_uri=http://localhost -
From the response, copy the
refresh_tokenvalue
6. Configure DocuNova
- Set
DROPBOX_APP_KEY,DROPBOX_APP_SECRET, andDROPBOX_REFRESH_TOKENwith your values - Set
DROPBOX_FOLDERto the path where files should be uploaded (e.g.,/Documents/Uploads)
The system will use the refresh token to automatically generate short-lived access tokens when needed, so you shouldn't need to worry about token expiration.