Skip to main content

Contents

  • Login
  • User details
  • Company details
  • Project details
  • Logout
  • Edit profile

Login

headers
{
  'Content-Type': 'application/json',
  'Version': <app_version>,
  'Client-Code': <api_client_code>,
}
body [raw]
{
  username: <email>,
  password: <password>,
  device_id: <device_id>,
  type: <device_type>,
  force_logout: <force_logout>,
  registration_id: <registration_id>,
  name: <device_name>,
}
response
{
  "code": 201,
  "data": {
    "email_verified": <boolean>,
    "id": <id>,
    "is_granted": <boolean>,
    "last_active_device": {
      "active": "True",
      ...
    },
    "status": <status>,
    "terms_accepted": <boolean>,
    "token": <user_token>,
    "type": <user_type>
  },
  "detail": "Success",
  "success": true,
}

device_id

It is passing for device registration. It is used to generate the access token for authentication

device_name

It is passing for device registration. It is used to generate the access token for authentication..

force_logout

It is a boolean value. If true, the current user token will be refreshed and a new user token will be given in the response. You can restrict multiple device login with this. If the user wants to login into multiple devices, give this value as false.

registration_id

Current timestamp is using as registration_id here.

is_granted

It is a boolean variable. If true, the user is allowed to log in. If false, there is some issue in login due to an invalid user token sent or something.

last_active_device

contains details of the user’s device that were previously active. Comparing this with the current device, you can verify the user is logging in on multiple devices. If you want to restrict this, call login API again with force_logout as true.