Login
Login and take token from server
Login
POST https://abc.hoola.vn/manage/api/users/login-user
Request Body
Name
Type
Description
string
Email Address
password
string
Password
// Response Code "00". Login successfully.
// Return data:
{
respCode: "00",
token: "6KxGr8LJzlixGIUskGv3VodeFI9u8fWtPs3no3Q3S3h",
tokenExpires: "2021-06-14T08:51:23.685Z",
msg: "login success",
}// Response Code "02". No request body.
// Return data:
{ respCode: "02", msg: "No request body" }
// Response Code "03". No email in the request body.
// Return data:
{ respCode: "03", msg: "No email in request body" }
// Response Code "04". No password in the request body.
// Return data:
{ respCode: "04", msg: "No password in request body" }
// Response Code "05". Wrong email.
// Return data:
{ respCode: "05", msg: "Wrong email" }
// Response Code "07". Wrong password.
// Return data:
{ respCode: "07", msg: "Wrong password" }// Response Code "02". Wrong request method.
// Return data:
{ respCode: "01", msg: "Request method should be POST" }// Response Code "06". Server not able to check password.
// Return data:
{
respCode: "06",
msg: "Server not able to check password",
}
// Response Code "08". Server not able to generate token.
// Return data:
{
respCode: "08",
msg: "Server not able to generate token"
}Example:
// POST:
https://abc.hoola.vn/manage/api/users/login-user
body:
{
email: "[email protected]",
password: "1234567890"
}Last updated
Was this helpful?