POST api/account/auth/mobile

login/register using mobile otp based authentication

Request Information

URI Parameters

None.

Body Parameters

Credentials to be used for authenticating the user mobile

OTPVerify
NameDescriptionTypeAdditional information
id

email OTP verification

string

Required

otp

email id to receive OTP on it

string

Required

app_source

different flavour of app. source id

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "id": "sample string 1",
  "otp": "sample string 2",
  "app_source": 1
}

application/xml, text/xml

Sample:
<OTPVerify xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">
  <app_source>1</app_source>
  <id>sample string 1</id>
  <otp>sample string 2</otp>
</OTPVerify>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

On success, returns valid ApplicationToken that can be used for future transactions. On failure, return 401 Unauthorized http result with the specified values.

ExternalAuthIdentity
NameDescriptionTypeAdditional information
token_identity

user authentication token identity

AuthTokenIdentity

None.

is_password_set

when user signin using external provider then set password for user Lifetrons account

boolean

None.

is_mobile_number_set

when user signin using external provider then set mobile number for user Lifetrons account

boolean

None.

is_new_user

check user is newly created or already exists on Lifetrons

boolean

None.

resp_code

Lifetrons response code

string

None.

resp_msg

Lifetrons response message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "token_identity": {
    "user_identity": {
      "user_id": 1,
      "uid": "sample string 2"
    },
    "token": "sample string 1",
    "firebase_token": "sample string 2"
  },
  "is_password_set": true,
  "is_mobile_number_set": true,
  "is_new_user": true,
  "resp_code": "sample string 4",
  "resp_msg": "sample string 5"
}

application/xml, text/xml

Sample:
<external_auth_resp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models.v5">
  <resp_code xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 4</resp_code>
  <resp_msg xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 5</resp_msg>
  <is_mobile_number_set>true</is_mobile_number_set>
  <is_new_user>true</is_new_user>
  <is_password_set>true</is_password_set>
  <token_identity>
    <firebase_token>sample string 2</firebase_token>
    <token>sample string 1</token>
    <user_identity xmlns:d3p1="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Seedwork.v3">
      <d3p1:uid>sample string 2</d3p1:uid>
      <d3p1:user_id>1</d3p1:user_id>
    </user_identity>
  </token_identity>
</external_auth_resp>