Download large folders from Dropbox shared links that are too big for the web interface.
- Downloads files from Dropbox shared folder links
- Resume support: Skips already-downloaded files
- Auto-refresh: OAuth refresh tokens automatically renew (no 4-hour expiry)
- Retry logic: Handles connection drops with exponential backoff
- Recursive: Downloads all subfolders
- Python 3.7 or later
dropboxPython package
# Create and activate a virtual environment
python3 -m venv ~/.virtualenvs/dropbox
source ~/.virtualenvs/dropbox/bin/activate
# Install dependencies
pip install dropbox- Go to https://www.dropbox.com/developers/apps
- Click "Create app"
- Select "Scoped access"
- Select "Full Dropbox"
- Give it a name (e.g., "folder-downloader")
- Click "Create app"
- Go to the Permissions tab
- Enable these checkboxes:
files.content.readsharing.read
- Click "Submit" at the bottom to save
- Go to the Settings tab
- Copy the App key
- Click "Show" next to App secret and copy it
Run the authentication script:
python dropbox_auth.py --app-key YOUR_APP_KEY --app-secret YOUR_APP_SECRETThis will:
- Display a URL to visit in your browser
- Ask you to authorize the app and copy the code
- Save credentials to
~/.dropbox_credentials.json
The refresh token doesn't expire, so you only need to do this once.
python dropbox_download.py -o /path/to/output "DROPBOX_SHARED_URL"python dropbox_download.py --dry-run "DROPBOX_SHARED_URL"If you prefer not to set up OAuth, you can use a short-lived access token:
python dropbox_download.py --token YOUR_ACCESS_TOKEN -o /path/to/output "URL"Note: Access tokens expire after ~4 hours.
# Download a shared folder
python dropbox_download.py -o ./downloads "https://www.dropbox.com/scl/fo/abc123/..."
# Preview what will be downloaded
python dropbox_download.py --dry-run "https://www.dropbox.com/scl/fo/abc123/..."
# Resume a failed download (just run the same command again)
python dropbox_download.py -o ./downloads "https://www.dropbox.com/scl/fo/abc123/..."- Navigate to the folder in Dropbox web interface
- Click "Share" button
- Copy the link
The URL should look like:
https://www.dropbox.com/scl/fo/{folder_id}/{hash}/{path}?rlkey={key}&...
- Make sure you clicked "Submit" on the Permissions tab after enabling permissions
- Verify the app key is correct
If using OAuth with refresh token, it should auto-renew. If it fails:
python dropbox_auth.py --app-key YOUR_KEY --app-secret YOUR_SECRETThe script automatically retries with exponential backoff. If downloads keep failing:
- Check your internet connection
- Try again later (Dropbox may be rate limiting)
Just run the same command again. The script checks file sizes and skips already-downloaded files.
~/.dropbox_credentials.json # OAuth credentials (created by dropbox_auth.py)
dropbox_auth.py # One-time OAuth setup
dropbox_download.py # Main download script