Authenticate a user and return JWT tokens.
Validates the user’s credentials against the specified account and returns JWT tokens for authenticated access.
Flow:
Security:
cURL
curl --request POST \ --url https://api.example.com/api/v1/auth/login \ --header 'Content-Type: application/json' \ --data ' { "account": "<string>", "email": "[email protected]", "password": "<string>" } '
{ "token": "<string>", "refresh_token": "<string>", "expires_in": 123, "account": { "id": "<string>", "slug": "<string>", "name": "<string>", "created_at": "2023-11-07T05:31:56Z" }, "user": { "id": "<string>", "email": "<string>", "role": "<string>", "is_active": true, "created_at": "2023-11-07T05:31:56Z" } }
Request body for user login.
Account identifier (slug or ID in XX#### format)
1
User's email address
User's password
Successful Response
Response for successful authentication (login).
JWT access token
JWT refresh token
Access token expiration time in seconds
Account information
Show child attributes
User information