Dropbox
Automatically upload signed PDFs to Dropbox when all signatures are complete.
Requirements
Section titled “Requirements”- WPsigner 2.1.0+
- A Dropbox account
- A Dropbox App (created in the App Console)
Step 1: Create a Dropbox App
Section titled “Step 1: Create a Dropbox App”- Go to the Dropbox App Console
- Click Create App
- Choose Scoped access → Full Dropbox
- Name it (e.g., “WPsigner Backup”)
- Under Permissions, enable
files.content.write - Copy the App Key and App Secret
Step 2: Set Redirect URI
Section titled “Step 2: Set Redirect URI”In the Dropbox App Console, add the following redirect URI:
https://your-site.com/wp-admin/admin.php?page=wpsigner-dropboxStep 3: Configure WPsigner
Section titled “Step 3: Configure WPsigner”- Go to WPsigner → Integrations → Dropbox
- Enter your App Key and App Secret
- Click Save Settings
- Click Authorize Dropbox to connect your account
- Approve the permissions in Dropbox
- You’ll be redirected back showing Connected
How It Works
Section titled “How It Works”When all signers complete their signatures, WPsigner triggers the wps_pdf_completed hook. The Dropbox integration then:
- Generates the signed PDF file locally
- Builds the destination path using the configured folder and naming convention
- Uploads the file via Dropbox API v2 (
/2/files/upload) - Creates the destination folder automatically if it doesn’t exist
- Logs the upload to the WPsigner audit trail
| Event | Action |
|---|---|
| All signatures complete | PDF uploaded to Dropbox:/WPsigner/Title_Date_ID.pdf |
File Naming
Section titled “File Naming”The default file naming pattern is:
{folder}/{sanitized_title}_{date}_{document_id}.pdf| Segment | Example | Description |
|---|---|---|
{folder} | /WPsigner | Configurable in settings (default: /WPsigner) |
{sanitized_title} | Service-Agreement | Document title, sanitized for safe file names |
{date} | 2026-03-06 | Signing date in Y-m-d format |
{document_id} | 142 | Internal WPsigner document ID |
Full path example:
/WPsigner/Service-Agreement_2026-03-06_142.pdfYou can change the destination folder in WPsigner → Integrations → Dropbox. The folder path must start with /.
Use Cases
Section titled “Use Cases”| Scenario | Configuration |
|---|---|
| Centralized contract archive | Default folder /WPsigner, all documents in one location |
| Per-client organization | Use the wps_dropbox_backup_path filter to route files by client |
| Compliance backup | Pair with Amazon S3 for redundant storage |
| Team collaboration | Set folder to a shared Dropbox folder accessible by your team |
| Automated workflows | Combine with Dropbox Automations to trigger post-upload actions |
Compatibility
Section titled “Compatibility”| Component | Supported Versions |
|---|---|
| WPsigner | 2.1.0+ |
| WordPress | 6.0+ |
| PHP | 7.4+ |
| Dropbox API | v2 |
| Dropbox Plans | All plans (Basic, Plus, Professional, Business) |
| Max file size | Limited by PHP memory_limit (single upload, no chunking) |
| Multisite | Supported (per-site configuration) |
Security
Section titled “Security”| Feature | Details |
|---|---|
| OAuth 2.0 | Standard authorization flow with offline tokens |
| AES-256-GCM | App secret and tokens encrypted at rest |
| Token Refresh | Automatic — access tokens renewed when expired |
| Rate Limiting | Test: 5/min, Save: 10/min per user |
Troubleshooting
Section titled “Troubleshooting”| Issue | Cause | Solution |
|---|---|---|
| ”Not connected. Please authorize first.” | OAuth tokens are missing or cleared | Click Authorize Dropbox again |
| ”Security check failed” | Nonce expired | Refresh the page and retry |
| ”Too many requests” | Rate limit exceeded | Wait 60 seconds and retry |
| Upload test succeeds but PDFs don’t appear | Integration is not enabled | Toggle the Enabled switch and save |
”Upload failed” with path/not_found | Folder path is invalid | Ensure folder starts with / (e.g., /WPsigner) |
| OAuth redirect shows error | Redirect URI mismatch | Verify the redirect URI in Dropbox App Console matches exactly |
| Tokens expire unexpectedly | App secret was changed in Dropbox Console | Re-authorize after updating the app secret in WPsigner |
| Files overwritten | Different documents share the same title and date | Document ID in the filename prevents this; check for ID collisions |
| Large files fail to upload | PHP memory limit too low | Increase memory_limit in php.ini (recommended: 256M+) |
Developer Hooks
Section titled “Developer Hooks”wps_dropbox_backup_path
Section titled “wps_dropbox_backup_path”Filter the full Dropbox path before upload. Use this to customize folder structure, naming conventions, or route files dynamically.
add_filter('wps_dropbox_backup_path', function ($dropbox_path, $document_id, $document) { // Organize by year/month $year = wp_date('Y'); $month = wp_date('m'); return "/WPsigner/{$year}/{$month}/" . basename($dropbox_path);}, 10, 3);Parameters:
| Parameter | Type | Description |
|---|---|---|
$dropbox_path | string | Full Dropbox path (e.g., /WPsigner/Title_2026-03-06_42.pdf) |
$document_id | int | WPsigner document ID |
$document | object | Document object with title, status, and other properties |
wps_dropbox_uploaded
Section titled “wps_dropbox_uploaded”Action fired after a successful upload. Use this for post-upload processing like notifications or logging.
add_action('wps_dropbox_uploaded', function ($document_id, $dropbox_path) { error_log("Document {$document_id} backed up to Dropbox: {$dropbox_path}");}, 10, 2);Next Steps
Section titled “Next Steps”- OneDrive — Microsoft OneDrive backup
- Google Drive — Google Drive backup
- Amazon S3 — S3 bucket storage
- Cloudflare R2 — Zero egress, global CDN
- Wasabi — S3-compatible, no egress fees