Dropbox Integration Guide

Complete guide to integrating Dropbox through LawLink.ai

📦 Dropbox Business
🚀

Integration Steps

Follow these steps to integrate your application with Dropbox through LawLink.ai.

Create Organization Admin & Login

A Superuser or Admin creates an Organization Admin (ORG_ADMIN) account for your law firm. The ORG_ADMIN manages users and API tokens.

💡 Tip: Login to LawLink at https://app.lawlink.ai using your ORG_ADMIN credentials.

Create API Access Token

Navigate to API Tokens and create a new access token. Set an appropriate expiration period. Copy the token immediately — it is only shown once.

⚠️ Important: Store your API token securely. It grants access to all users in your organization.

Add User Accounts

As an ORG_ADMIN, navigate to the Organization page and add user accounts. Each user will have their own Dropbox OAuth connection.

📋 Fields Required: Email, Full Name, Password. Users are automatically assigned the USER role.

🔐

Authentication

Authorize Dropbox Access

Each user must authorize LawLink to access their Dropbox account. Call /authorize to obtain the Dropbox OAuth URL, redirect the user, and LawLink will handle the token exchange on callback.

Step 1 — Get the Authorization URL

# Initiate Dropbox OAuth flow curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/authorize" \ -H "Authorization: Bearer ACCESS_TOKEN"
{ "url": "https://www.dropbox.com/oauth2/authorize?client_id=...&response_type=code&..." }

🔐 OAuth Flow: Redirect the user to the returned URL. Dropbox authenticates the user and calls LawLink's callback automatically. On success, the user is redirected back to the application.

Check Connection Status

# Check if user has an active Dropbox connection curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/status" \ -H "Authorization: Bearer ACCESS_TOKEN"
{ "connected": true }

Disconnect Dropbox

# Revoke the Dropbox connection curl.exe -X DELETE \ "https://app.lawlink.ai/api/v1/dropbox/disconnect" \ -H "Authorization: Bearer ACCESS_TOKEN"
📄

File Operations

Full file lifecycle: list, search, upload, download, get a temporary link, move, copy, and delete. Paths are Dropbox native paths (e.g. /Contracts/doc.pdf) or Dropbox IDs (e.g. id:abc123).

1. List & Search Files

List files inside a folder path or search across the account. Leave path empty for the root. Pass query to perform a full-text search.

# List files at the root curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/files?limit=25" \ -H "Authorization: Bearer ACCESS_TOKEN" # List files in a subfolder curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/files?path=/Contracts&limit=25" \ -H "Authorization: Bearer ACCESS_TOKEN" # Search by keyword curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/files?query=retainer&limit=25" \ -H "Authorization: Bearer ACCESS_TOKEN"
{ "entries": [ { "id": "id:abc123", "name": "Retainer_Agreement.pdf", "path_lower": "/contracts/retainer_agreement.pdf", "size": 204800, "server_modified": "2026-04-01T10:00:00Z" } ], "has_more": false }

2. Upload a File

Send a multipart/form-data POST. The path field must include the full destination path including the filename. Maximum upload size is ~150 MB.

⚠️ Overwrite: Set overwrite=true to replace an existing file at the destination path. Default is false.

# Upload a file to a specific path curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/files/upload" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -F "file=@Retainer_Agreement.pdf" \ -F "path=/Contracts/Retainer_Agreement.pdf" \ -F "overwrite=false"
{ "id": "id:abc123", "name": "Retainer_Agreement.pdf", "path_lower": "/contracts/retainer_agreement.pdf", "size": 204800 }

3. Download a File

Returns the file content base64-encoded (max 50 MB). For larger files or browser use, use the temporary link endpoint instead.

# Download a file by path curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/files/download?path=/Contracts/Retainer_Agreement.pdf" \ -H "Authorization: Bearer ACCESS_TOKEN"
{ "name": "Retainer_Agreement.pdf", "content_base64": "JVBERi0xLjQK...", "size": 204800 }

4. Get a Temporary Download Link

Returns a short-lived direct-download URL (~4 hour validity). Ideal for browser downloads or streaming large files without routing the content through LawLink.

# Get a temporary link for a file curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/files/temporary-link?path=/Contracts/Retainer_Agreement.pdf" \ -H "Authorization: Bearer ACCESS_TOKEN"
{ "link": "https://dl.dropboxusercontent.com/apitl/1/...", "expires": "2026-05-01T18:00:00Z", "metadata": { "name": "Retainer_Agreement.pdf", "size": 204800 } }

5. Move, Copy & Delete Files

Move or rename a file by providing from_path and to_path. Copy duplicates a file to a new location. Delete permanently removes the file.

# Move (rename) a file curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/files/move" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from_path": "/Contracts/Retainer_Agreement.pdf", "to_path": "/Contracts/Retainer_Agreement_FINAL.pdf" }' # Copy a file to a new location curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/files/copy" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from_path": "/Contracts/Retainer_Agreement.pdf", "to_path": "/Archive/Retainer_Agreement.pdf" }' # Delete a file curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/files/delete" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "path": "/Contracts/old_draft.pdf" }'
📁

Folder Operations

Create, list, move, copy, and delete folders. Paths follow Dropbox's native format (e.g. /Contracts/2026) or Dropbox IDs (e.g. id:abc123).

1. List Folders

List sub-folders at a given path. Leave path empty to list root folders.

# List folders at the root curl.exe -X GET \ "https://app.lawlink.ai/api/v1/dropbox/folders?limit=50" \ -H "Authorization: Bearer ACCESS_TOKEN"
{ "entries": [ { "id": "id:folderabc", "name": "Contracts", "path_lower": "/contracts" }, { "id": "id:folderxyz", "name": "Correspondence", "path_lower": "/correspondence" } ] }

2. Create a Folder

Create a new folder at the specified path. Set autorename to true to avoid conflicts if the folder already exists.

# Create a new folder curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/folders" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "path": "/Contracts/2026", "autorename": false }'
{ "id": "id:newfolder", "name": "2026", "path_lower": "/contracts/2026" }

3. Move, Copy & Delete Folders

Move or rename a folder using from_path / to_path. Copy duplicates the entire folder tree. Delete removes the folder and all its contents.

# Move a folder curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/folders/move" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from_path": "/Contracts/2025", "to_path": "/Archive/2025" }' # Copy a folder curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/folders/copy" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from_path": "/Templates", "to_path": "/Templates_Backup" }' # Delete a folder and all contents curl.exe -X POST \ "https://app.lawlink.ai/api/v1/dropbox/folders/delete" \ -H "Authorization: Bearer ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "path": "/Archive/2024" }'