2 Factor Authentication using Miss Call Bulk SMS API Documentation

2 Factor Authentication using Miss Call

Authenticate your users using Miss Call Services..

Application API URL:

https://www.smsgateway.center/OTPApi/send

 

Import 2FA Miss Call API postman collection.

Postman Collection

 

 

Download PHP Class Reference - Missed Call 2FA - PHP Class Reference

 

Key Value Description
Login Credentials (Required Parameters)
Authenticate your API request using userId-password or apiKey. You should use either one to authenticate your login.
userId Your Registered Username The registered username parameter to be passed. You can use this if apiKey is not being used.
password Your password The password needs to be urlencoded if there are any special characters used in the password field. You can use this if apiKey is not being used.
apiKey Your unique apiKey apiKey needs to be sent as HTTP header when you are not using userId and password credentials. You can avail this from your user control panel and use instead of userId and password HTTP Request parameter. Please do not disclose this to anyone.
Required Parameters
mobile Mobile Number with Country Code Enter your Customer's mobile number which needs to be verified.

Comments: Keep number in International format (with country code).
sendMethod generate

Required: This value required for send OTP code to recipient's mobile number.

missCallTo Your dedicated missed call number Required: Your availed dedicated missed call number to be sent in value.

Comments: You have to let us know where customer will be calling.
medium misscall Required:. Name of the medium to deliver OTP to. You can deliver on 2 medium simultaneously. System default is sms.

Comments: You can use comma separated with maximum 2 mediums, that is sms,email. OTP token will be delivered to both sms and email.
callback Valid callback script URL with http or https protocol Required. The response will be forwarded to the provided URL.

Comments: To receive authentication details, you need to set a callback URL. Response Parameters will be sent to your url as status=success&type=new&generationTime=2017-12-06%2023%3A18%3A15&validity=120%20secs&otp=6754
Default Parameters (Optional)
codeExpiry Time in seconds Optional. Minimum 60 Seconds, Maximum 1800 Seconds, System default is 60 Seconds.

Comments: Expiry Time of OTP Token to Verify, in Seconds.
retryExpiry Retry Time in seconds Optional. Minimum 15 Seconds, Maximum 1800 Seconds, System default is 60 Seconds.

Comments: Maximum time to allow your users to regenerate OTP. E.g. If you have set 60 seconds, then user cannot request OTP again for next 60 seconds.
renew true|false Optional. Set to True to reset retry missed call expiry time. System default is false.

Comments: If missed call expiry needs to be reset.
format plain|json|xml Value for response format.

System default is plain. If you need responses in JSON or XML then you have to give value as JSON or XML.

Save this Page on your Favorite Social Media

Sample Request Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/OTPApi/send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "userId=YourUserName&password=YourPassword&mobile=919999999999&missCallTo=912299999999&sendMethod=generate&codeExpiry=300&retryExpiry=60&medium=misscall&callback=http%3A%2F%2Fwww.example.com%2FgetMissCallResponse.php&format=json",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/OTPApi/send?userId=YourUserName&password=YourPassword&mobile=919999999999&missCallTo=912299999999&sendMethod=generate&codeExpiry=300&retryExpiry=60&medium=misscall&callback=http%3A%2F%2Fwww.example.com%2FgetMissCallResponse.php&format=json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Response - Success

{
    "status": "success",
    "mobile": "919999999999",
    "transactionId": "aae3f87f-76ab-4824-bddb-76fb9c18194a",
    "statusCode": "900",
    "type": "new",
    "reason": "Give misscall on missCallTo",
    "createTime": "1516000108160",
    "expiryTime": "1516000408160",
    "retryAfter": "1516000168160",
    "missCallTo": "912299999999"
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<simpleMessageSuccessResponse>
    <mobile>919999999999</mobile>
    <status>success</status>
    <statusCode>900</statusCode>
    <reason>Give misscall on missCallTo</reason>
    <transactionId>4f2f9022-a130-4a52-a81d-61ad2f938b6f</transactionId>
    <createTime>1516112743618</createTime>
    <expiryTime>1516113043618</expiryTime>
    <retryAfter>1516112803618</retryAfter>
    <missCallTo>912299999999</missCallTo>
</simpleMessageSuccessResponse>
status=success | mobile=919999999999 | reason=Give misscall on missCallTo | transactionId=f3a8712e-804e-4824-9c68-fa54b00e2550 | errorCode=900 | type=new | createTime=1516112796914 | expiryTime=1516113096914 | retryExpiry=1516112856914 | missCallTo=912299999999

Response - Error

{
    "status": "error",
    "statusCode": "911",
    "reason": "Invalid user credentials."
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errorResponse>
    <status>error</status>
    <statusCode>911</statusCode>
    <reason>Invalid user credentials.</reason>
</errorResponse>
status=error | errorCode=911 | reason=Invalid user credentials.