EndpointsSign in to an OpenCode Server's web UI

OpenCode Servers

Sign in to an OpenCode Server's web UI

Creates a one-time link that signs the browser in to the OpenCode Server's own web UI. The link expires after about a minute. Requires a workspace user; the server must belong to the workspace and be active.

POST/opencodes/{id}:createClientToken
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.

Required string length: 1 - 53

Example: "ws_j572abc123def4"

idstringrequired

OpenCode Server id (oc_...).

Pattern: ^oc_[a-z0-9]{1,64}$

Example: "oc_j572abc123def456"

Response

application/json

OpenCodeClientToken

urlstringrequired

The web UI address with a one-time client token in its fragment (#ct=...). Open it in a browser, or set it as an iframe's source; the token is exchanged for a session of that server and never reaches a server log.

expires_atintegerrequired

When the token expires unused, in Unix seconds. Tokens live about a minute.