Authorization header:
/v1/... paths, which is how you reach
the things that only live there — machines, and the tokens themselves.
Getting a token
Tokens are minted by the API, not by a settings page:string
What the token is for. Defaults to
API Token - <timestamp> when you leave it out.integer
default:"60"
How long it lives. Anything above 525600 (a year) is clamped to a year.
token, plus name, expires_at,
expires_in in seconds and scope: "api". The plaintext is returned once and
is not stored anywhere you can read it again; the server keeps a hash. Lose it
and you mint another.
Minting requires a paid plan. On a free account the request is refused, and says so:
403.
List the ones you have — expired tokens are dropped from the listing rather than
shown as dead rows:
{id, name, expires_at, created_at, scope, status}. Revoke one by
its id:
What a token can reach
A token is the account, not a subset of it. There are no per-resource scopes to configure: every v2 resource is filtered to the principal the token names, and a run is visible to the account that started it or the account being billed for it. The consequence worth knowing is that a resource belonging to somebody else and a resource that does not exist are the same answer:What a refusal looks like
No header, a malformed header, an expired token or a revoked one all produce the same 401:403 forbidden with Account suspended. instead — the
credential was fine, the account is not.
In the SDKs
All three read the environment, so nothing in your code has to hold the key:SploxAuthError in Python,
AuthenticationError in Node, splox.ErrUnauthorized in Go — so you can tell a
bad key from a bad request without reading status codes yourself.
