Request an access token
Issues an OAuth2 access token. No Bearer token is needed; the grant itself is the credential.
Two request formats are accepted, chosen by Content-Type, and each has its own response shape:
- application/json with camelCase members (grantType, clientId, clientSecret, username, password, code, state, codeVerifier) answers with the camelCase token (accessToken, tokenType, expiresIn, …).
- application/x-www-form-urlencoded with the standard OAuth2 members (grant_type, client_id, client_secret, username, password, code) answers with the standard snake_case token (access_token, token_type, expires_in, …). Client credentials may instead be sent as HTTP Basic authentication, which then takes precedence over client_id/client_secret in the form.
grantType is one of password, client_credentials or sso_code. password requires username and password; client_credentials requires clientId and clientSecret; sso_code requires code, state and codeVerifier (the PKCE verifier of the code_challenge sent to GET /v1/sso/start), and is a JSON-only grant.
When the person signing in has MFA enabled, a password or sso_code grant does not issue a token: it answers 200 with mfaRequired=true and an mfaToken, which is then sent to POST /v1/login/mfa/verify to obtain the token.
Errors use the envelope, plus fields on body validation errors. 400: Content-Type missing or not one of the two formats, malformed form or Basic credentials (AUT-0009), a grant missing the members it needs (AUT-0014), an invalid or expired SSO code (AUT-0027). 401: wrong username or password (AUT-1002), wrong client credentials (AUT-1004), password grant for a person created through SSO with no password (AUT-1006), suspended or expired partner (AUT-1009, AUT-1010). 403: caller IP outside the IP allowlist (AUT-0021), person not allowed to sign in (AUT-1008). 429: account temporarily locked after repeated failures (AUT-1007). 503 AUT-0028: the sign-in needs a second factor and this server has no MFA signing secret configured.
Headers
Optional HTTP Basic client authentication (Basic base64(client_id:client_secret)), read on form requests only. When present it takes precedence over client_id/client_secret in the form body.
Body
password, client_credentials, sso_code "password"
"00000000-0000-0000-0000-000000000000"
"00000000-0000-0000-0000-000000000000"
"4%2F0AbCd...idp"
"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
"password"
"kQ7f...opaque"
"johndoe"
Response
OK
- Option 1
- Option 2
- Option 3
The issued OAuth2 access token (JWT).
"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ"
Access token lifetime in seconds.
3600
The refresh token to obtain a new access token.
"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ"
The token type; always "Bearer".
"Bearer"
The OIDC ID token (JWT).
"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ"
Space-delimited scopes granted to the token.
"openid profile email"

