POST api/account/whatsapp/otp/{id}

Send login OTP via WhatsApp instead of SMS. Parallels but routes the OTP through Meta's WhatsApp Cloud API using the AUTHENTICATION template (). Same MobileVerify store as SMS — verify (auth/mobile) does not know or care which channel delivered the OTP. Unlike the SMS endpoint this does NOT enforce +91 — WhatsApp covers global recipients. If the recipient is not on WhatsApp, Meta returns 131026 which we translate to a message steering the user to SMS.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

authenticated user id (0 for pre-login / new signups)

integer

Required

Body Parameters

mobile details to receive otp

MobileVerify
NameDescriptionTypeAdditional information
country_code

country code of mobile number entered by user for verification

string

Required

mobile_number

mobile number to receive OTP on it

string

Required

app_source

app source id

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "country_code": "sample string 1",
  "mobile_number": "sample string 2",
  "app_source": 1
}

application/xml, text/xml

Sample:
<mobile_verify xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models.v5.UsersModel">
  <app_source>1</app_source>
  <country_code>sample string 1</country_code>
  <mobile_number>sample string 2</mobile_number>
</mobile_verify>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

On success, returns encrypted mapping id On failure, lifetrons fail result

GenericResp
NameDescriptionTypeAdditional information
id

generic id to return

integer

None.

other_user_id

this is used when user remove member from group or other id

integer

None.

mapping_id

string mapping id to return to client

string

None.

string_id

any string id to return to client

string

None.

resp_code

Lifetrons response code

string

None.

resp_msg

Lifetrons response message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "id": 1,
  "other_user_id": 1,
  "mapping_id": "sample string 1",
  "string_id": "sample string 2",
  "resp_code": "sample string 3",
  "resp_msg": "sample string 4"
}

application/xml, text/xml

Sample:
<generic_resp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Domain.ResponseAgg.v5">
  <resp_code xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 3</resp_code>
  <resp_msg xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 4</resp_msg>
  <id>1</id>
  <mapping_id>sample string 1</mapping_id>
  <other_user_id>1</other_user_id>
  <string_id>sample string 2</string_id>
</generic_resp>