Hanzo
OpenapiAccount

IssueCSRFToken mints the anti-CSRF token a browser echoes as X-CSRF-Token on…

IssueCSRFToken mints the anti-CSRF token a browser echoes as X-CSRF-Token on every money write (mint/revoke a key, top up, onboard, and the…

GET /v1/account/csrf

Addresshttps://api.hanzo.ai/v1/account/csrf
MethodGET
Operationget_account_csrf
AuthAuthorization: Bearer $HANZO_API_KEY

IssueCSRFToken mints the anti-CSRF token a browser echoes as X-CSRF-Token on every money write (mint/revoke a key, top up, onboard, and the billing/commerce write verbs). The token is bound to the caller's validated identity and expires, so one minted for one identity cannot authorize a write as another.

It is answered no-store, so it is never cached by a shared proxy. This is the same-origin endpoint the embedded console reads — the Same-Origin Policy is what stops a cross-site page from reading the response and forging a write.

Request

GET /v1/account/csrf takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200csrfRespok

200 body — 2 fields.

FieldInTypeAlwaysDescription
csrfTokenbodystringToken is the value to send back in the X-CSRF-Token header.
expiresInbodyintegerExpiresIn is the token's lifetime in seconds.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Account API · All Hanzo APIs · Interactive reference

How is this guide?

On this page