Authentication

Personal access tokens with scopes, AI Agents as members of their own, and OAuth for apps that act for people.

這一頁還沒有翻譯,所以先以英文顯示。

Every /v1 call sends a bearer token. A token made for one drive acts in it without naming it: calls under /v1/space/… act in the token's drive, so no drive id goes in the path.

HTTP
GET /v1/space/paths/Ep01/script.md HTTP/1.1
Host: side.space
Authorization: Bearer ssp_6Jw…

Credentials that reach more than one drive name the drive instead: /v1/spaces/{id}/… (also answered at /v1/drives/{id}/…) is the same call for a person's sign-in (the apps, side login), an OAuth app granted several drives, a token for a whole workspace, or a token made with --all-spaces. For those, /v1/space/… answers 400 with code space_required.

There are three ways to get one, depending on who the program acts for.

ProgramTokenHow
Your script, CI job or servicePersonal access token ssp_…The dashboard's API keys page, or side token create
An AI Agent or bot that should appear as itselfA token for an Agent memberside agent create, then token create --agent
An app that other people sign in toOAuth 2.1 access tokenAuthorization code with PKCE

People sign in to the apps with an email code, or through their workspace's identity provider when it has set up single sign-on. A code works once. Sign-in endpoints answer 429 with code rate_limited and a Retry-After header (seconds) when an address or a network has tried too often; after 10 wrong codes in an hour the address is locked for the rest of that hour.

Personal access tokens

Tokens start with ssp_. The server stores only a hash, so a token is shown once. Each token has scopes, reaches the drive or workspace it was made for, and expires after 90 days unless you choose otherwise (--expires-days 0 never expires).

Shell
side token create "nightly export" --scope files:read   # for the drive the CLI works in
side token list
side token revoke tok_01JD…

The CLI makes a token for its current drive (the one you picked at side login; side use switches, --drive names another), and the dashboard's API keys page one for the whole workspace: every drive of it, forks made later included. --all-spaces makes the rare token that reaches every workspace you're in; it names the drive in each call.

The CLI accepts a token too, with no sign-in: set SIDESPACE_TOKEN=ssp_… or pass --token.

On a Mac with the Side Space app, the side command that comes with it signs in by itself: the first command that needs an account uses the account the app is signed in to, on the app's server, as a device of its own. The app approves that sign-in and the command collects its own tokens, so the app's tokens never leave the app. side logout ends only the command's session and keeps it signed out until side login (or side login --app for the app's account again). Turn it off in the app under Settings › Permissions › Command Line › Use This Mac's Account. Naming another server with --server skips it.

Scopes

ScopeAllows
files:readList drives, browse, search, read versions and sidecars, download, read notifications
files:writeEverything in files:read, plus upload, create, rename, move, delete and restore
sidecars:writeWrite any sidecar namespace
sidecars:write:<ns>Write one namespace; a trailing * covers a family, e.g. sidecars:write:x-acme.*
renditions:writeUpload thumbnails, proxies and other renditions
events:readRead the journal and realtime signals
shares:manageCreate and revoke share links
members:manageAdd, change and remove members of the workspace
webhooks:manageManage the drive's webhooks (the token's owner must be an owner or admin of the workspace)
comments:writeComment, reply and resolve (commenter or above)
adminAll of the above, plus creating and renaming drives

A scope never adds to what the person behind the token may do in a workspace: an admin token of a viewer is still a viewer there.

Tokens can't manage devices, tokens or Agents. Those need a signed-in app or CLI, so a token can never mint a stronger token.

Errors you will see

  • 403 with {"error": {"code": "forbidden", "message": "this token needs the files:write scope"}} names the missing scope.
  • 404 for a drive outside the token's reach, exactly like a drive that doesn't exist. The API never confirms that a drive you can't see exists.
  • 402 with code quota_exceeded when a plan limit stops a save, a new member or an AI run. The message says which limit of the workspace's plan and when a monthly allowance renews. Show it as is. GET /v1/space/plan (or side plan) returns the workspace's plan, limits and use.
  • 402 with code plan_required when the workspace is on the Free plan, which is locked until someone chooses a plan (only on servers that take payments). Files are kept; the message says where to choose a plan.

Agents

An AI Agent or service account can be a member of its own instead of borrowing a person's identity. Everything it changes is recorded with actor_kind: "agent", and the apps show a purple Agent badge in members, version history and activity.

Shell
side agent create "Clip Tagger"
side members --add "Clip Tagger" --role editor
side token create tagger --agent "Clip Tagger" \
  --scope files:read --scope "sidecars:write:x-tagger.*"
side agent rm "Clip Tagger"   # revokes its tokens and removes it from every workspace

Agents can't sign in with an email code; they act only through tokens. When an Agent is removed, its past changes keep its name.

Work the server does itself is marked too. A thumbnail made by media processing is recorded as actor_kind: "plugin", actor_via: "media".

OAuth for apps

Apps that act for other people (a web app, a desktop tool, an MCP client) use the OAuth 2.1 authorization code flow with PKCE, so nobody copies tokens around. Server metadata: /.well-known/oauth-authorization-server.

Register the app:

Shell
side app create "Acme Review" --redirect https://acme.example/oauth/callback
# client_id = app_01…
side app create "Acme Sync" --redirect https://acme.example/cb --confidential   # server-side app, also gets a client_secret
side app list
side app rm app_01…      # every grant stops working at once

Then:

  1. Send the person to /oauth/authorize with response_type=code, client_id, redirect_uri, state, code_challenge, code_challenge_method=S256 and scope (space-separated, e.g. files:read files:write).
  2. They sign in with their email code, choose which scopes and drives to grant, and are sent back to redirect_uri?code=…&state=…&iss=….
  3. Your app posts a form to /oauth/token: grant_type=authorization_code, code, redirect_uri, client_id, code_verifier. The answer has an access_token (ssp_…, one hour) and a refresh_token (ssr_…, 90 days, replaced at every refresh).
  4. Refresh with grant_type=refresh_token. Sign out with POST /oauth/revoke.
Shell
curl -X POST https://side.space/oauth/token \
  -d grant_type=authorization_code -d code="$CODE" -d client_id=app_01… \
  -d redirect_uri=https://acme.example/oauth/callback -d code_verifier="$VERIFIER"
  • Without scope, the default is files:read files:write comments:write runs:write. admin can't be granted to an app, and the person may untick scopes or pick only some drives.
  • A grant is a token: it appears in the person's side token list as app:… and can be revoked there. Scopes, drive limits and the 403/404 rules are the same as for any token.
  • Redirect URIs must be https, loopback http (any port, RFC 8252) or the app's own scheme (cursor://…). Public clients must use PKCE.
  • Apps may also register themselves at POST /oauth/register (RFC 7591, public clients only). MCP clients do this. The consent page says the app registered itself.