The connected account: who it is, its space usage, and the path root for a team space.

Team space. Members of teams using the team space see team folders beside their own folder only when calls carry Dropbox-API-Path-Root with their root namespace. Read it once with team-path-root(get-current-account()) and pass it as opts.path-root (or store it in the dropbox.path.root context variable).

Scopes. account_info.read.

Functions

get-current-account

fn (): Map
fn (opts: Map): Map

POST users/get_current_account - the connected account: account_id, name, email, account_type, root_info (root_namespace_id, home_namespace_id), team for team members.

Example

account ::dropbox::users/get-current-account()
account.email

// A team token acting as one member
member ::dropbox::users/get-current-account({select-user: "dbmid:AAH4f99"})
member.name.display_name

get-space-usage

fn (): Map
fn (opts: Map): Map

POST users/get_space_usage - {used, allocation} in bytes (allocation is individual or team).

Example

usage ::dropbox::users/get-space-usage()
usage.used

team-path-root

fn (account: Map): Map?

The path-root option for an account's team space (pure): a Dropbox-API-Path-Root value relative to root_info.root_namespace_id when it differs from the home namespace (a team-space member), else null (no header needed).

account ::dropbox::users/get-current-account()
root ::dropbox::users/team-path-root(account)
::dropbox::files/list-folder("", {path-root: root})