Login
Endpoint used for user authentication in the system. Upon successful login, it returns a JWT token that should be used to authorize subsequent requests.
Request
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/auth/login |
| Content-Type | application/json |
| Authentication | None |
Request
curl -X POST "{BASE_URL}/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | Yes | User's username |
password | string | Yes | User's password |
Request Body
{
"username": "john.doe",
"password": "securePassword123"
}
Response Body
| Parameter | Type | Description |
|---|---|---|
data.accessToken | string | JWT access token for authorizing subsequent requests |
data.tokenType | string | Token type (always "Bearer") |
data.expireDate | integer | Token expiration date (Unix timestamp in ms) |
data.remainingTime | integer | Token validity time remaining in milliseconds |
data.username | string | Username of the authenticated user |
data.message | string | Message confirming successful authentication |
meta.executionTime | integer | Request processing time in milliseconds |
meta.generatedAt | integer | Response generation timestamp (Unix timestamp in ms) |
message | string | Main response status message |
Successful Response (200)
{
"data": {
"accessToken": "eyJhbGc...",
"tokenType": "Bearer",
"expireDate": 1763638078917,
"remainingTime": 899999,
"username": "john.doe",
"message": "Authentication successful"
},
"meta": {
"executionTime": 9,
"generatedAt": 1763637178918
},
"message": "Authentication successful"
}
Error Response (4xx/5xx)
| Parameter | Type | Description |
|---|---|---|
message | string | Human-readable error message |
Error Response
{
"message": "Username or password is incorrect"
}
Notes
- Token expires after 900 seconds (15 minutes).
- Maximum 5 login attempts per minute per IP address.
- Passwords must meet minimum security requirements.
- Use HTTPS in production environments.
Support Needed?
Create a free ticket and our support team will provide you necessary assistance.