Authentication Dashboard
This API is used to authenticate users to access the Dashboard service.
Endpoint
URL : {BaseURL}/api/v1/auth/login
Method : POST
Header : Content-Type : Application/JSON
Request
This section describes the request parameters and provides examples of JSON requests used to authentication user.
Description Parameter Request
| Field | Data Type | Mandatory | Format | Description |
|---|---|---|---|---|
| username | String (200) | YES | User's email address. Required. Must be a valid email format, with a minimum length of 5 characters and a maximum length of 200 characters. | |
| password | String (200) | YES | Alphanumeric | User's password. Required. Must have a minimum length of 8 characters and maximum length is 200. to contain at least one lowercase letter, one uppercase letter, one number, and one special character. |
Sample JSON Request
curl --location --globoff '{{BaseURL}}/api/v1/auth/login' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "User-dashboard@mail.com",
"password": "Tes12345!"
}'
Response
This section describes the response parameters and provides JSON response examples returned by the Prezent platform after a user successfully login.
Description Parameter Response
| Field | Data Type | Mandatory | Format | Description |
|---|---|---|---|---|
| requestID | String (36) | YES | UUID | Unique identifier for the request. |
| rc | Integer (3) | YES | Numeric | Response code indicating the status of the operation. |
| Message | String (200) | YES | Alphanumeric | A descriptive message regarding the response. |
| data | JSON Object | YES | JSON Object | Detail information from data. |
| key | String (200) | NO | Alphanumeric | This field is intended for use with the Sandeza Integrated key. |
| token | String (2000) | YES | JWT | Authentication token for the logged-in user. |
| userId | String (36) | YES | UUID | Unique identifier of the user. |
| userName | String (200) | YES | Alphanumeric | Name of the user. |
| userEmail | String (200) | YES | User's email address. | |
| userPhoneNumber | String (200) | YES | Numeric | User's phone number. |
| roleId | String (36) | YES | UUID | Identifier of the customer. |
| roleName | String (200) | YES | Alphanumeric | Name of the user's role. |
| companyId | String (36) | YES | UUID | Identifier of the user's company. |
| companyName | String (200) | YES | Alphanumeric | Name of the user's company. |
| divisionId | String (36) | YES | UUID | Identifier of the user's division. |
| divisionName | String (200) | YES | Alphanumeric | Name of the user's division. |
| isInternal | Boolean | YES | True / false | Indicates whether the user is an internal system user. |
Sample JSON Response
{
"requestId": "12fec0b7-0340-43b8-a13a-f6e015931ecb",
"rc": 200,
"message": "read data successfully",
"data": {
"key": "",
"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjYwbTBsdU56ek5HT0NobFhQMV82U0taNk1MTGp4OTZ0QUNHN3NUYktobk0iLCJ0eXAiOiJKV1QifQ.eyJ1c2VySWQiOiJmMGI3ODA5OS1jNTQxLTQzMWQtODRjOC1iOGFlMTczZTM5NDgiLCJ1c2VyTmFtZSI6InNhdG9zaGkgbmFrYW1vdG8iLCJyb2xlSWQiOiJmMzRhOTBmYy1hNjZmLTRlNTMtOTNmNy02MjBlYWQ3OGE4Y2YiLCJyb2xlTmFtZSI6IlN5c3RlbSBBZG1……..",
"userId": "f0b78099-c541-431d-84c8-b8ae173e3yyy",
"userName": "userDashboard",
"userEmail": "User-dashboard@mail.com",
"userPhoneNumber": "+6282100000001",
"roleId": "f34a90fc-a66f-4e53-93f7-620ead78yyyy",
"roleName": "Operator",
"companyId": "7059942f-d617-4438-9a69-6b44fd51yyyy",
"companyName": "PT Company",
"divisionId": "5897ddd5-cd92-4ff0-bc0c-cd0573f37yyy",
"divisionName": "Marcom",
"isInternal": false
}
}