Skip to main content
The JWT access token expires after 120 minutes. The refresh token expires after 240 minutes. Use the Refresh Token endpoint to obtain a new token pair before your session expires.

Request

POST /api/auth/login No authentication required.

Body

email
string
required
The user’s email address.
password
string
required
The user’s password.

Response

statusCode
number
HTTP status code of the operation. 200 on success, 401 on failure.
status
boolean
true if the request succeeded, false otherwise.
message
string
A human-readable message describing the result.
data
object
Present on success. Contains the authenticated user’s token and profile information.
curl --request POST \
  --url https://localhost:7191/api/auth/login \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "user@example.com",
    "password": "YourPassword1!"
  }'
{
  "statusCode": 200,
  "status": true,
  "message": "Login exitoso.",
  "data": {
    "fullName": "Jane Doe",
    "email": "user@example.com",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "tokenExpiration": "2024-01-15T14:30:00Z",
    "refreshToken": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...",
    "refreshTokenExpire": "2024-01-15T16:30:00Z"
  }
}

Build docs developers (and LLMs) love