API Authentication & Usage Limits

Login using user credentials, to get token. Token is valid for 2 hours, you should request for new token after that.

Route: /login/contact

Method: POST

Required Parameters:

  • username (required) Valid email address, max 191 characters.

  • password (required) String between 8 - 32 characters.

Possible HTTP responses for Login

RESPONSE 202 - AUTHENTICATION SUCCESS

{
  "token": "ABCDEFGHI...",
  "user": {
    "...":"...",
    "...":"...",
     ...
  },
  "status": "AUTHENTICATED"
}

RESPONSE 422 - INVALID AUTHENTICATION

{
  "msg": "Invalid authentication using credentials",
  "status": "NOT_AUTHENTICATED"
}

Resetting Password, Part 1

In case of losing your password you can request to generate new one:

No Authorization token required

Route: /contact/password/reset

Method:POST

Required Fields:

  • email: Valid email address, max 191 characters long

Possible API responses:

RESPONSE 200 - OK, SUCCESS

{
  "msg": "New password reset token was sent to your email address",
  "result": true
}

RESPONSE 200 - OK, FAILURE

{
  "msg": "User with the email address not found",
  "result": false
}

Resetting Password, Part 2

After getting password reset token emailed to you, now you can change your password

No Authorization token required

Route: /contact/password/reset/{password_reset_token}

Method: POST

Required Fields:

  • password: between 8-32 characters long

Possible API responses:

RESPONSE 200 - OK, SUCCESS

{
  "msg": "Password for your user was successfully changed",
  "result": true
}

RESPONSE 200 - OK, FAILURE - TOKEN NOT FOUND

{
  "msg": "Password reset token not found.",
  "result": false
}

OTHER FAILURE RESPONSES MIGHT RETURN

  • errors:
    • password: Field is required. If password field not provided
    • password: Must be 8-32 characters. If field does not meet minimum requirements

Authenticating with the token

After successful login to API, you get the token, for other API methods you need to provide Authorization HTTP Request Header token, with other required params (if any) to get access to the resources available to you through the API

API Usage Limitations

Per day you can login to API 20 times