Skip to main content
Agent Sandboxes requires two credentials, one for each plane. A Telnyx API key authenticates requests at the control plane. A short-lived token authenticates requests at a region’s data plane. Both are sent as Authorization: Bearer. See Architecture for the requests each plane serves.

API Key

A Telnyx API key authenticates every request to the control plane at https://api.telnyx.com. Create one in the Telnyx Portal. See Create API Keys. The request below creates a sandbox with the API key. The CLI reads the key stored by telnyx-edge auth api-key set.

Sandbox Token

A token authenticates requests at a region’s data plane. The control plane issues it for the API key’s organization.
API
The response carries the token, its expiry, and the base URL of every region.
Output
The token is valid for one hour in every region. A request with a missing, expired, or altered token receives 401. The token is checked when a request starts, so an exec stream or a WebSocket opened with it stays open after it expires. The CLI uses the API key for the control plane, and mints and caches the data-plane token itself. A data-plane request carries the token in the same header. The data-plane examples on the other pages write the region’s base URL with /v2/compute/sandbox appended as $DATA_API.
API