Corgi BankDocumentation
OpenAPI

Create a token

POST/tokensNo authentication

Issue a service token by client credentials. A wrong client id or secret answers identity.credential_invalid. A replica whose configuration for the client is older than the live one — the generation it holds has been retired — mints nothing and answers 503 unavailable: retry, and a replica with the live configuration issues the token.

Headers

Idempotency-KeystringOptional

Send on every write that creates or changes money or state; a replay with the same key returns the original result with 200.

Body parameters

client_idstringRequired

The service account, svc_accounts

client_secretstringRequired

Its secret

grant_typestringRequired

Client_credentials

scopestringRequired

Space-separated scopes the token should carry; each must be granted to the client

Returns

200 OK

The Token object.

Errors

Every error is a problem document with a stable code. See Errors.

400401403404409412413422424429500503

to move to open esc to close