Skip to content

Dropbox

Automatically upload signed PDFs to Dropbox when all signatures are complete.


  • WPsigner 2.1.0+
  • A Dropbox account
  • A Dropbox App (created in the App Console)

  1. Go to the Dropbox App Console
  2. Click Create App
  3. Choose Scoped accessFull Dropbox
  4. Name it (e.g., “WPsigner Backup”)
  5. Under Permissions, enable files.content.write
  6. Copy the App Key and App Secret

In the Dropbox App Console, add the following redirect URI:

https://your-site.com/wp-admin/admin.php?page=wpsigner-dropbox
  1. Go to WPsigner → Integrations → Dropbox
  2. Enter your App Key and App Secret
  3. Click Save Settings
  4. Click Authorize Dropbox to connect your account
  5. Approve the permissions in Dropbox
  6. You’ll be redirected back showing Connected

When all signers complete their signatures, WPsigner triggers the wps_pdf_completed hook. The Dropbox integration then:

  1. Generates the signed PDF file locally
  2. Builds the destination path using the configured folder and naming convention
  3. Uploads the file via Dropbox API v2 (/2/files/upload)
  4. Creates the destination folder automatically if it doesn’t exist
  5. Logs the upload to the WPsigner audit trail
EventAction
All signatures completePDF uploaded to Dropbox:/WPsigner/Title_Date_ID.pdf

The default file naming pattern is:

{folder}/{sanitized_title}_{date}_{document_id}.pdf
SegmentExampleDescription
{folder}/WPsignerConfigurable in settings (default: /WPsigner)
{sanitized_title}Service-AgreementDocument title, sanitized for safe file names
{date}2026-03-06Signing date in Y-m-d format
{document_id}142Internal WPsigner document ID

Full path example:

/WPsigner/Service-Agreement_2026-03-06_142.pdf

You can change the destination folder in WPsigner → Integrations → Dropbox. The folder path must start with /.


ScenarioConfiguration
Centralized contract archiveDefault folder /WPsigner, all documents in one location
Per-client organizationUse the wps_dropbox_backup_path filter to route files by client
Compliance backupPair with Amazon S3 for redundant storage
Team collaborationSet folder to a shared Dropbox folder accessible by your team
Automated workflowsCombine with Dropbox Automations to trigger post-upload actions

ComponentSupported Versions
WPsigner2.1.0+
WordPress6.0+
PHP7.4+
Dropbox APIv2
Dropbox PlansAll plans (Basic, Plus, Professional, Business)
Max file sizeLimited by PHP memory_limit (single upload, no chunking)
MultisiteSupported (per-site configuration)

FeatureDetails
OAuth 2.0Standard authorization flow with offline tokens
AES-256-GCMApp secret and tokens encrypted at rest
Token RefreshAutomatic — access tokens renewed when expired
Rate LimitingTest: 5/min, Save: 10/min per user

IssueCauseSolution
”Not connected. Please authorize first.”OAuth tokens are missing or clearedClick Authorize Dropbox again
”Security check failed”Nonce expiredRefresh the page and retry
”Too many requests”Rate limit exceededWait 60 seconds and retry
Upload test succeeds but PDFs don’t appearIntegration is not enabledToggle the Enabled switch and save
”Upload failed” with path/not_foundFolder path is invalidEnsure folder starts with / (e.g., /WPsigner)
OAuth redirect shows errorRedirect URI mismatchVerify the redirect URI in Dropbox App Console matches exactly
Tokens expire unexpectedlyApp secret was changed in Dropbox ConsoleRe-authorize after updating the app secret in WPsigner
Files overwrittenDifferent documents share the same title and dateDocument ID in the filename prevents this; check for ID collisions
Large files fail to uploadPHP memory limit too lowIncrease memory_limit in php.ini (recommended: 256M+)

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:

ParameterTypeDescription
$dropbox_pathstringFull Dropbox path (e.g., /WPsigner/Title_2026-03-06_42.pdf)
$document_idintWPsigner document ID
$documentobjectDocument object with title, status, and other properties

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);