Skip to content
Dashboard
Theme
Theme

Redeem a sandbox handoff

POST /v1/sandboxes/handoffs/token: Redeem a sandbox handoff.

View Markdown

POST /v1/sandboxes/handoffs/token

Polled by the CLI every interval seconds. Before the browser created the sandbox it answers 400 authorization_pending; polling faster than the interval answers slow_down (add 5 seconds to the interval). Once the sandbox exists it returns its keys and claim URL exactly once and wipes them. The code verifier is compared in constant time; a wrong one answers 400 invalid_grant and counts, and after 5 wrong verifiers the handoff is invalidated. An expired, consumed, invalidated or unknown handoff answers 410 sandbox_handoff_expired. Not served on the standby host (503).

Scope
public
Auth
None
Since
1.0
  • handoff_id string Required

    min length 43 · max length 43

  • code_verifier string Required

    min length 43 · max length 128

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/sandboxes/handoffs/token" \
-H "Content-Type: application/json" \
-d '{
"handoff_id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
}'
Response 200
{
"environment": "env_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"secret_key": "sk_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"publishable_key": "pk_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"claim_url": "https://app.acme.com/callback",
"expires_at": "2026-01-15T09:30:00Z"
}