This article explains how to create a Dropbox access token that can be used with the hTech OS Backup WHMCS addon module to store backups securely in Dropbox.
Overview
The hTech OS Backup module uses a Dropbox API access token to authenticate and upload backups. The recommended method is to create a Scoped App Token using a Dropbox App.
Requirements:
- A Dropbox account
- Access to the Dropbox App Console
- WHMCS admin access to configure the backup module
Step 1: Sign in to Dropbox Developers
- Go to the Dropbox Developer Console:
https://www.dropbox.com/developers/apps - Sign in with your Dropbox account.
Step 2: Create a New Dropbox App
- Click Create app.
- Under Choose an API, select:
Scoped access - Under Choose the type of access, select one:
- App folder (recommended – limits access to one folder)
- Full Dropbox (only if you need full account access)
- Enter an App name, for example:
htech-whmcs-backups - Click Create app.
Step 3: Configure App Permissions
- After the app is created, open the Permissions tab.
- Enable the following permissions:
- files.content.write
- files.content.read
- files.metadata.read
Important: After changing permissions, click Submit at the bottom of the page.
Step 4: Generate an Access Token
- Go to the Settings tab of your Dropbox app.
- Scroll to the OAuth 2 section.
- Click Generate under Generated access token.
- Copy the token immediately and store it securely.
Note: Treat this token like a password. Anyone with this token can access the permitted Dropbox data.
Step 5: Configure Dropbox in the hTech OS Backup Module
- Log in to your WHMCS Admin Area.
- Go to:
Admin → Addons → hTech OS Backup → Settings - Set Backup Provider to:
Dropbox - Paste the Dropbox Access Token into the token field.
- (Optional) Set a folder path, for example:
/backups/htech_os_backup - Click Save Changes.
Step 6: Test the Dropbox Connection
- From the hTech OS Backup module, run a manual backup.
- Wait for the backup to complete successfully.
- Log in to Dropbox and confirm the backup file appears in the configured folder.
If the backup completes and appears in Dropbox, the token is working correctly.
Troubleshooting
Backup Fails or Cannot Connect
- Verify the access token is correct and not truncated.
- Ensure required permissions were enabled and submitted.
- If permissions were changed after token creation, generate a new token.
Permission or Path Errors
- If using App folder access, ensure the path is relative to the app folder.
- Do not use absolute Dropbox paths outside the app folder unless using Full Dropbox access.
Token Compromised
- Go to the Dropbox App Settings page.
- Click Revoke next to the access token.
- Generate a new token and update it in WHMCS.
Security Best Practices
- Use App folder access whenever possible.
- Never share your Dropbox access token publicly.
- Rotate tokens periodically for security.
- Store backups in a dedicated Dropbox account if possible.
Need Help?
If you continue to experience issues:
- Enable debug logging in the hTech OS Backup module.
- Check the WHMCS Activity Log for errors.
- Contact hTech support with the error message and module version.