Login
Updated date: 19/05/2023
Updated by: VNPT eContract's team
Purpose
Obtain the token code information to access APIs that require authentication.
- Request URL:
api/v2/auth/password-login
- HTTP method:
POST
- HTTP content-type:
application/json
- Parameter:
Key | Type | Description |
---|---|---|
username | string | [Required] Username of user |
password | string | [Required] Password of user |
Sample request
{
"username": "congtyABC@email.com",
"password": "123456"
}
Sample response body
{
"data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9……",
"success": true,
"code": 0,
"messages": [
"Authenticate and choose company success"
]
}
Caution
- If the account only manages one company, the system will automatically select the company after calling this API.
- If the account manages multiple companies, after calling this API, you need to call the choose-company API to determine the processing operation within which company.
Return code
Code | Description |
---|---|
200 (OK) | Success |
401 (Unauthorized) | Token is wrong or expired |
502 (Bad Gateway) | Timeout |