Skip to main content

Authentication PWA

This API is used to authenticate users to access the PWA service.

Endpoint

URL : {BaseURL}/api/v1/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
FieldData TypeMandatoryFormatDescription
emailString
(200)
YESEmailUser's email address. Required. Must be a valid email format, with a minimum length of 5 characters and a maximum length of 200 characters.
passwordString
(200)
YESAlphanumericUser's password. Required. Must have a minimum length of 8 characters and maximum length is 200. Must contain at least one lowercase letter, one uppercase letter, one number, and one special character.
Sample JSON Request
curl --location --globoff '{{pwa-user-management}}/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "pwa-user@mail.com",
"password": "Tes12345!"
}'

Response

This section describes the response parameters and provides JSON response examples returned by the PWA platform after a user successfully login.
Description Parameter Response
FieldData TypeMandatoryFormatDescription
requestIDString
(36)
YESUUIDUnique identifier for the request.
rcInteger
(3)
YESNumericResponse code indicating the status of the operation.
MessageString
(200)
YESAlphanumericA descriptive message regarding the response.
dataJSON ObjectYESJSON ObjectDetail information from data.
tokenString
(2000)
YESJWTAuthentication token for the logged-in user.
userIdString
(36)
YESUUIDUnique identifier of the user.
userNameString
(200)
YESAlphanumericName of the user.
emailString
(200)
YESEmailUser's email address.
phoneNumberString
(200)
YESNumericUser's phone number.
customerIdString
(36)
YESUUIDIdentifier of the customer.
companyIdString
(36)
YESUUIDIdentifier of the company.
Sample JSON Response
{
"requestID": "26c9cb66-8071-49fa-8126-136b1068b241",
"rc": 200,
"message": "Login Successfully",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb21wYW55SWQiOiIwN2Q2YjhiOS1hNDViLTQwZTgtOTc2Zi0wZjdiMTJjNjUyZDIiLCJjdXN0b21lcklkIjoiMzliMjA5MTktM2ZmMS00M2NlLTh….",
"userId": "39b20919-3ff1-43ce-8a35-2780320dayyy",
"userName": "userTest",
"email": "pwa-user@mail.com",
"phoneNumber": "+62081945800005",
"customerId": "39b20919-3ff1-43ce-8a35-2780320dayyy",
"companyId": "07d6b8b9-a45b-40e8-976f-0f7b12c65yyy"
}
}