Control plane authentication
API key
Pass your API key in theX-API-Key header on every control plane request:
OIDC bearer token
If your organisation integrates with an identity provider, you can use an OIDC bearer token in theAuthorization: Bearer header instead of an API key:
X-API-Key) and an OIDC token (Authorization: Bearer) in the same request, the API key takes precedence.
Data plane authentication
The sandbox data plane does not accept your organisation API key. It only accepts capability tokens — short-lived, cryptographically signed credentials that the control plane mints and that carry the sandbox ID, the current epoch, a port scope, and an expiry time. Pass a capability token in theX-Sandbox-Token header on every data plane request:
Minting a capability token
CallPOST /v1/sandboxes/{sandboxId}/token on the control plane to mint a fresh token:
Token attenuation
You can restrict a capability token to specific ports by supplying theports array when minting:
If you use the TypeScript SDK, you do not need to mint or manage capability
tokens yourself. The SDK stores the token returned when a sandbox is created or
resumed and automatically re-mints it when the current one nears expiry. You
only need to mint tokens manually when calling the data plane directly, or when
you want to hand a scoped credential to a browser client or third party.
Authentication errors
Both errors follow the standard error format with a machine-readable
code field.