Skip to main content

Generate OTP

POST /generateOTP

Request Body

{
"phone_no": "09xxxxxxxxx",
"country_prefix": "95",
"app_id": "[YOUR APP ID]",
"hash": "[HAHS VALUE]"
}

Description

NameDescription
phone_noMyanmar mobile number only. Start with 09
country_prefix95 only
app_idAPP ID from OTP SMS
hashHMAC("SHA256",phone_no + app_id,APP SECRET)

Example Hash

$strValue = $phone_no.$app_id;
$hashValue = hash_hmac('sha256', $strValue, $app_secret);

Response

{
"error": false,
"account_id": 6451673,
"resend_time_interval": 2
}

Description

NameDescription
errorWill return success or fail
account_idAccount Id for phone number. Use for checking OTP
resend_time_intervalWhen allow to resend the same phone number.