Authentication
POST Auth
Endpoint: auth/
Provide username and password to exchange a valid token.
Parameter: X-Forwarded-For (header, string)
batch
Parameter: Content-Type (header, string)
application/json
Parameter: password (body, string)
login password
Parameter: username (body, string)
email of the account
Response: 200 — Login successful
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"user": {
"sid":"xxx",
"first_name":"xxx",
"last_name":"xxx",
"email":"xxx@labii.com"
}
}
Response: 406 — Wrong username or password
["Unable to log in with provided credentials."]
POST Forget Password
Endpoint: /forgetpassword/
Receive a email to reset the password. \
Parameter: email (body, string)
email of the account
Response: 200
{tag: xxxxx}
POST Reset Password
Endpoint: resetpassword/?tag={tag}
Change user password.
Parameter: tag (query, string)
The tag returned from forget password method
Parameter: password (body, string)
The new password
Response: 200
{}
Response: 406 — Wrong parameters
Error: Missing Tag in GET! - Tag is missing in the url
Error: Wrong Tag! - Tag is not valid
Unknown request! - User not exists
The link has expired - Tag is valid for only 30 min
GET Logout
Endpoint: /logout/
Logout your account, invalid the token.
Parameter: token (header, string)
user token
Response: 200
{}
Response: 401 — Wrong token