Authentication

Last updated 4 months ago

post
Auth

{{base_url}}/accounts/
auth/
Provide username and password to exchange a valid token.
Request
Response
Form Data Parameters
password
required
string
login password
username
required
string
email of the account
200: OK
Login successful
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"user": {
"sid":"xxx",
"first_name":"xxx",
"last_name":"xxx",
"email":"xxx@labii.com"
}
}
406: Not Acceptable
Wrong username or password
["Unable to log in with provided credentials."]

post
Forget Password

{{ base_url }}/accounts
/forgetpassword/
Receive a email to reset the password.
Request
Response
Form Data Parameters
email
required
string
email of the account
200: OK
{tag: xxxxx}

post
Reset Password

{{ base_url }}/accounts/
resetpassword/?tag={tag}
Change user password.
Request
Response
Query Parameters
tag
required
string
The tag returned from forget password method
Form Data Parameters
password
required
string
The new password
200: OK
{}
406: Not Acceptable
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

{{base_url}}/accounts
/logout/
Logout your account, invalid the token.
Request
Response
Headers
token
required
string
user token
200: OK
{}
401: Unauthorized
Wrong token