Sandboxes

Mint an endpoint token

Changed on

A token for the url of an active sandbox created with ports, sent as Authorization: Bearer, and browser_url, the link that opens url in a browser. Both work for every replica until the end of the sandbox's ttl_seconds or 30 days after the mint, whichever is earlier; rotating the signing key revokes them.

post/sandboxes/{sandbox_id}/endpoint-token

Request

  • Base URL
    https://api.hedra.com/v3
  • Auth
    • API key in header Authorization
    • or HTTP bearer

Path parameters

sandbox_idstring required

The sandbox's id (sandbox_<uuid>).

Response

Successful Response

tokenstring required

The endpoint token.

urlstring required

The sandbox's url, the address to send token to.

browser_urlstring required

The link to open in a browser: url with token as its hedra_token query parameter. The sandbox answers the first request with a cookie that holds token and a redirect to the same address without the parameter, so that browser stays signed in to this sandbox until expires_at, or until a signing-key rotation revokes token. It is a credential, as token is: anyone who opens it reaches the sandbox until then.

expires_atstring date-time required

When token stops working: the end of the sandbox's ttl_seconds or 30 days after the mint, whichever is earlier, later only by the time the mint took. Mint a new one before then.

Changes