Claude
Skills
Sign in
Back

dropbox

Included with Lifetime
$97 forever

Dropbox API for file storage. Use when user mentions "Dropbox", "dropbox.com", shares a Dropbox link, "upload to Dropbox", or asks about cloud storage.

Backend & APIs

What this skill does


## Troubleshooting

If requests fail, run `zero doctor check-connector --env-name DROPBOX_TOKEN` or `zero doctor check-connector --url https://api.dropboxapi.com/2/users/get_current_account --method POST`

## User

### Get Current Account

```bash
curl -s -X POST "https://api.dropboxapi.com/2/users/get_current_account" \
  --header "Authorization: Bearer $DROPBOX_TOKEN"
```

### Get Space Usage

```bash
curl -s -X POST "https://api.dropboxapi.com/2/users/get_space_usage" \
  --header "Authorization: Bearer $DROPBOX_TOKEN"
```

## Files & Folders

### List Folder

Use `""` for root, or `/path/to/folder` for subfolders.

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/list_folder" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"\", \"recursive\": false, \"limit\": 100}"
```

### List Folder (Continue)

When `has_more` is true in the response, use the cursor to get more results.

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/list_folder/continue" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"cursor\": \"<cursor>\"}"
```

### Get Latest Cursor

Get a cursor for the current state without listing files. Useful for detecting changes later.

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/list_folder/get_latest_cursor" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"\", \"recursive\": true}"
```

### Get File/Folder Metadata

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/get_metadata" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\"}"
```

### Search Files

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/search:2" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"query\": \"report\", \"options\": {\"max_results\": 20, \"file_status\": \"active\"}}"
```

### Search Continue

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/search/continue:2" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"cursor\": \"<cursor>\"}"
```

### Create Folder

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/create_folder:2" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/New Folder\", \"autorename\": false}"
```

### Delete File or Folder

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/delete:2" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/path/to/delete\"}"
```

### Permanently Delete

Requires Dropbox Business with permanent delete enabled.

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/permanently_delete" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/path/to/delete\"}"
```

### Move File or Folder

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/move:2" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"from_path\": \"/old/file.txt\", \"to_path\": \"/new/file.txt\", \"autorename\": false}"
```

### Copy File or Folder

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/copy:2" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"from_path\": \"/source/file.txt\", \"to_path\": \"/dest/file.txt\", \"autorename\": false}"
```

### List File Revisions

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/list_revisions" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\", \"limit\": 10}"
```

### Restore File to Revision

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/restore" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\", \"rev\": \"<revision-id>\"}"
```

### Save URL to Dropbox

Download a URL directly into Dropbox.

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/save_url" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Downloads/file.pdf\", \"url\": \"https://example.com/file.pdf\"}"
```

### Get Tags

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/tags/get" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"paths\": [\"/Documents/report.pdf\"]}"
```

### Add Tag

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/tags/add" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\", \"tag_text\": \"important\"}"
```

### Remove Tag

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/tags/remove" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\", \"tag_text\": \"important\"}"
```

## Upload & Download

### Upload File (up to 150 MB)

```bash
curl -s -X POST "https://content.dropboxapi.com/2/files/upload" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Dropbox-API-Arg: {\"path\": \"/Documents/report.pdf\", \"mode\": \"add\", \"autorename\": true}" \
  --header "Content-Type: application/octet-stream" \
  --data-binary @report.pdf
```

`mode`: `add` (fail if exists), `overwrite`, `update` (with rev).

### Download File

```bash
curl -s -X POST "https://content.dropboxapi.com/2/files/download" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Dropbox-API-Arg: {\"path\": \"/Documents/report.pdf\"}" \
  -o report.pdf
```

### Get Temporary Download Link

```bash
curl -s -X POST "https://api.dropboxapi.com/2/files/get_temporary_link" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\"}"
```

Returns a temporary link (4 hours) that doesn't require auth.

### Get Thumbnail

```bash
curl -s -X POST "https://content.dropboxapi.com/2/files/get_thumbnail:2" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Dropbox-API-Arg: {\"resource\": {\".tag\": \"path\", \"path\": \"/Photos/image.jpg\"}, \"format\": \"jpeg\", \"size\": \"w256h256\"}" \
  -o thumbnail.jpg
```

## Sharing

### Create Shared Link

```bash
curl -s -X POST "https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\", \"settings\": {\"requested_visibility\": \"public\"}}"
```

Visibility: `public`, `team_only`, `password` (with `link_password`).

### List Shared Links

```bash
curl -s -X POST "https://api.dropboxapi.com/2/sharing/list_shared_links" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"path\": \"/Documents/report.pdf\"}"
```

### Modify Shared Link

```bash
curl -s -X POST "https://api.dropboxapi.com/2/sharing/modify_shared_link_settings" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"url\": \"https://www.dropbox.com/s/xxx/file.pdf\", \"settings\": {\"requested_visibility\": \"team_only\"}}"
```

### Revoke Shared Link

```bash
curl -s -X POST "https://api.dropboxapi.com/2/sharing/revoke_shared_link" \
  --header "Authorization: Bearer $DROPBOX_TOKEN" \
  --header "Content-Type: application/json" \
  -d "{\"url\": \"https://www.dropbox.com/s/xxx/file.pdf\"}"
```

### Share Folder

```ba
Files: 1
Size: 12.3 KB
Complexity: 15/100
Category: Backend & APIs

Related in Backend & APIs