Hanzo AI
OpenapiAccount

List csrf

IssueCSRFToken mints the anti-forgery token a browser echoes as X-CSRF-Token on every change it asks for.

GET /v1/account/csrf

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

IssueCSRFToken mints the anti-forgery token a browser echoes as X-CSRF-Token on every change it asks for. The token is bound to the caller's validated identity and expires, so one minted for one identity cannot authorize a change 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 change.

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 account csrf

Account API · All Hanzo APIs · Interactive reference

How is this guide?

On this page