api Recent Posts

Here we describe the API for user authentication.

Here is the URL for user authentication,

POST api/v1/login

Expected parameters in the body

  • msisdn: The phone number of the user
  • password: The password of the user

Sample Request

1
2
3
4
{
  "msisdn": "84932466",
  "password": "12345678"
}

Sample Response

1
2
3
4
5
6
{
  "msisdn": "84932466",
  "username": "Mike Jackson"
  "authentication_token": "Uzzuxk4yz1_4sCX_hM86",
  "valid_for_authentication": true
}

If authentication is successful, the server returns the following attributes,

  • msisdn: The phone number of the user
  • username: the username
  • authentication_token: A token for the following user access
  • valid_for_authentication: Usually be true. Will be false if the user is locked or unverified.