Login — POST /api/v1/auth/login
Login
Authenticate and return JWT access + refresh tokens.
Endpoint: POST /api/v1/auth/login
Authentication: No token is needed. This is the sign-in endpoint: send username and password as form fields, and it returns an access token.
Parameters
Section titled “Parameters”This endpoint takes no parameters.
Request body
Section titled “Request body”| Content type | Body | Required |
|---|---|---|
application/x-www-form-urlencoded | Body_login_api_v1_auth_login_post | yes |
Responses
Section titled “Responses”| Status | Meaning | Body |
|---|---|---|
200 | Successful Response | TokenResponse or MfaChallengeResponse or MfaEnrollmentRequiredResponse (application/json) |
422 | Validation Error | HTTPValidationError (application/json) |
Errors this endpoint returns, read from its source code:
401, with the message “Incorrect username or password”403, with messages such as “Account disabled”, “SSO is required for this account. Please use the SSO login option”503
Statuses not listed here are explained in Errors and retries.
More details
Section titled “More details”- Group: Authentication
- Operation ID:
login_api_v1_auth_login_post - Source code:
backend/app/routers/auth.py, line 399 - Specification: OpenAPI JSON