enhancementgood first issueintegrationnew-featurenew-integration
Repository metrics
- Stars
- (1,930 stars)
- PR merge metrics
- (Avg merge 3h 2m) (10 merged PRs in 30d)
Description
Description
Add Dropbox integration to sync files, folders, and cloud storage activity into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/google-docs/- Similar cloud document integrationintegrations/google-sheets/- Google Workspace file integrationintegrations/github/- For webhook and event patterns
Required Files Structure
integrations/dropbox/
├── src/
│ ├── index.ts # Main entry, OAuth spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # Dropbox API utilities
│ ├── account-create.ts # OAuth setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
Dropbox API Integration
OAuth Setup
- Use OAuth 2.0 for authorization
- Base URL:
https://api.dropboxapi.com/2/ - Content upload/download:
https://content.dropboxapi.com/2/
Key Endpoints
POST /2/files/list_folder- List folder contentsPOST /2/files/list_folder/continue- Paginate folder listingPOST /2/files/get_metadata- Get file/folder metadataPOST /2/files/download- Download file contentPOST /2/files/upload- Upload filesPOST /2/files/search_v2- Search for filesPOST /2/files/list_revisions- Get file revision historyPOST /2/sharing/list_shared_links- List shared linksPOST /2/users/get_current_account- Get current user info
API Architecture
- HTTP-based API with POST for most operations
- Uses RPC-style endpoints (not strictly RESTful)
- Two API hosts:
api.dropboxapi.comfor RPC,content.dropboxapi.comfor uploads/downloads
Events to Track
- Files - File created, modified, renamed, deleted, moved
- Folders - Folder created, renamed, deleted, reorganized
- Sharing - Files/folders shared, shared links created
- Team Activity - Team member file activity (Business accounts)
- Revisions - File version changes and history
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement OAuth 2.0 flow in
account-create.ts - Create API utilities in
utils.tsfor Dropbox API v2 - Implement sync logic in
schedule.tsusinglist_folderand cursor-based pagination - Set up webhook handling for real-time file change notifications
- Convert Dropbox events to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- Dropbox API v2 uses POST for most operations (RPC-style), not traditional REST GET/PUT/DELETE
- Two separate hosts:
api.dropboxapi.comfor metadata/RPC andcontent.dropboxapi.comfor file content - Official SDKs available for Swift, .NET, Java, JavaScript, Objective-C, and Python
- Cursor-based pagination for efficient folder listing
- API Explorer available at
dropbox.github.io/dropbox-api-v2-explorer/for testing - Webhooks available for real-time change notifications
Resources
- Dropbox Developer Portal
- Dropbox HTTP API Documentation
- Dropbox API v2 Explorer
- Dropbox Developer Guides & Tutorials
- Dropbox API Postman Collection
Labels
enhancement, integration, new-feature