POST /
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
Request body
Section titled “Request body”handoff_idstring Requiredmin length 43 · max length 43
code_verifierstring Requiredmin length 43 · max length 128
Responses
Section titled “Responses”- 200 The sandbox’s keys, returned once. The response must not be cached. SandboxCreated
- 400 Invalid request. Codes: parameter_invalid, parameter_missing, version_unsupported and resource-specific codes from the catalogue. Error
- 410 Code: sandbox_handoff_expired. The handoff expired, was used or is unknown; start again. Error
- 429 Code: rate_limited. Retry-After is set. Error
- 503 Code: service_unavailable. Retry-After is set; writes are paused. Error
- default Any other error, including internal_error. Every code is in the error catalogue. Error
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"}'const response = await fetch("https://api.ohauthcat.com/v1/sandboxes/handoffs/token", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ "handoff_id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk" }),});const data = await response.json();import osimport requests
response = requests.post( "https://api.ohauthcat.com/v1/sandboxes/handoffs/token", json={ "handoff_id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", },)data = response.json(){ "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"}