A Dropbox API mock for uploading files.

Your agent uploads a file into the seeded Sales folder. Check the upload call and download the file to verify its contents.

Connect your agent
The test
  • file_uploaded

    Calls POST /2/files/upload

Starting records

  • people

    email
    laura@acme.example
    name
    Laura Kim
  • entries

    path
    /Sales

Connect your agent to the Dropbox mock

When ancha runs your agent, it sets:

  • DROPBOX_API_URL
  • DROPBOX_ACCESS_TOKEN

Point the client you already use at them.

import { Dropbox } from 'dropbox';
const dbx = new Dropbox({ accessToken: process.env.DROPBOX_ACCESS_TOKEN, fetch: (url: string, init?: RequestInit) => fetch(url.replace(/^https:\/\/(api|content)\.dropboxapi\.com/, process.env.DROPBOX_API_URL!), init) });
const { result } = await dbx.filesListFolder({ path: '' });

Locally, ancha runs your agent as an ordinary process, so keep real Dropbox credentials out of its environment.

See all 24 endpoints

2

POST/2/files/copy_v2
POST/2/files/create_folder_v2
POST/2/files/delete_v2
POST/2/files/download
POST/2/files/get_metadata
POST/2/files/get_temporary_link
POST/2/files/list_folder
POST/2/files/list_folder/continue
POST/2/files/list_revisions
POST/2/files/move_v2
POST/2/files/restore
POST/2/files/search_v2
POST/2/files/search/continue_v2
POST/2/files/upload
POST/2/sharing/add_folder_member
POST/2/sharing/create_shared_link_with_settings
POST/2/sharing/list_folder_members
POST/2/sharing/list_shared_links
POST/2/sharing/modify_shared_link_settings
POST/2/sharing/revoke_shared_link
POST/2/sharing/share_folder
POST/2/users/get_current_account
POST/2/users/get_space_usage

temporary

GET/temporary/{token}

Seed your own data

The data the Dropbox mock starts with on every run, cut to a few records. ancha twins seed dropbox prints every field.

Full seed YAML
twins:
  - dropbox
seed:
  dropbox:
    account:
      email: ancha@acme.example
      givenName: Ancha
      surname: Assistant
      team: Acme
    people:
      - email: laura@acme.example
        name: Laura Kim
    entries:
      - path: /Sales
        kind: folder

Check what your agent did

Checks YAML
checks:
  - id: file_uploaded
    trace:
      called: POST /2/files/upload

More docs and files tools

All 43 tools

Dropbox API mock FAQ

Can a Dropbox folder cursor reveal changes made after the first listing?

Pass the final cursor from /2/files/list_folder to /2/files/list_folder/continue after the agent changes files. Ancha returns the latest state of each changed path, including deleted entries.

How can I catch a Dropbox upload that uses an old revision?

Set mode to an object with .tag set to update and update set to the file's expected rev; leave autorename false. If the file already has a different revision and the uploaded bytes differ, the mock returns path/conflict/file.

What happens when an agent restores an earlier Dropbox file revision?

POST /2/files/restore reads the requested rev, writes its bytes to path and creates a new revision. The restored path is also recorded as a folder change, so a later cursor request can find it.

Install the CLI and run your agent against the Dropbox mock.

Book a demo

Ancha is not affiliated with Dropbox.