Skip to main content

POST /utils/login/access-token

OAuth2 compatible token login, get an access token for future requests

Authenticates a user using OAuth2 password flow and returns an access token for subsequent API requests.

Endpoint​

POST /utils/login/access-token

Parameters​

NameTypeDescription
sessionSessionDepThe database session dependency used for user lookup and authentication.
form_dataOAuth2PasswordRequestFormThe OAuth2 compatible form data containing the user's credentials.

Request Body​

FieldTypeDescription
usernamestringThe email address of the user attempting to log in.
passwordstringThe plain-text password of the user attempting to log in.

Response​

StatusDescription
200Successful authentication and token generation. Returns Token.
400Returned if the credentials are incorrect or if the user account is currently inactive. Returns JSON.