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.
file_uploadedCalls POST /2/files/upload
Starting records
people
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_URLDROPBOX_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
/2/files/copy_v2/2/files/create_folder_v2/2/files/delete_v2/2/files/download/2/files/get_metadata/2/files/get_temporary_link/2/files/list_folder/2/files/list_folder/continue/2/files/list_revisions/2/files/move_v2/2/files/restore/2/files/search_v2/2/files/search/continue_v2/2/files/upload/2/sharing/add_folder_member/2/sharing/create_shared_link_with_settings/2/sharing/list_folder_members/2/sharing/list_shared_links/2/sharing/modify_shared_link_settings/2/sharing/revoke_shared_link/2/sharing/share_folder/2/users/get_current_account/2/users/get_space_usagetemporary
/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/uploadMore docs and files tools
All 43 toolsDropbox API mock FAQ
Can a Dropbox folder cursor reveal changes made after the first listing?
Pass the final cursor from / to / 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/.
What happens when an agent restores an earlier Dropbox file revision?
POST / 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.
Ancha is not affiliated with Dropbox.