Skip to content
Dashboard
Theme
Theme

Start a sandbox handoff for the CLI

POST /v1/sandboxes/handoffs: Start a sandbox handoff for the CLI.

View Markdown

POST /v1/sandboxes/handoffs

The first step of ohauthcat init without credentials. The CLI sends the S256 challenge of a secret code verifier and opens browser_url; the browser page solves Turnstile and calls createSandbox with the handoff_id, which seals the new sandbox’s keys into the handoff instead of returning them; the CLI then redeems them once with redeemSandboxHandoff and the verifier. The handoff expires after expires_in seconds. Per-client rolling quotas (5 per hour and 20 per day per IPv4 address or IPv6 /64) and a global daily cap apply (rate_limited with Retry-After). Only a hash of the handoff ID is stored. Not served on the standby host (503).

Scope
public
Auth
None
Since
1.0
  • code_challenge string Required

    BASE64URL(SHA-256(code_verifier)) without padding (RFC 7636 §4.2).

    min length 43 · max length 43

  • code_challenge_method string Required

    one of S256

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/sandboxes/handoffs" \
-H "Content-Type: application/json" \
-d '{
"code_challenge": "example_code_challenge",
"code_challenge_method": "S256"
}'
Response 201
{
"handoff_id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"browser_url": "https://app.acme.com/callback",
"expires_in": 1,
"interval": 1
}