Send OTP (One time password) SMS to mobile number for verification using API code. Looking for way to verify user’s mobile number with SMS OTP ?
We are here to help.
Verify user phone numbers quickly and effectively using the SMS API. Add SMS Verification to Software and secure user data and authenticate users. With the PHP Send SMS API, easy to setup a simple, one time pin code system to verify user phone numbers across the globe and ensure software stays secure. Using the Send SMS API, we take care of the verification backend, from sending and managing the text SMS, so you just need to integrate our SMS verification code into your software.
SMS verification PHP API –
Send a unique security code to any mobile device via SMS. Use this API to verify personal details, help to reduce fraud, hacking and Spamming.
Supply own security code.You can use to detect if a number is actually a valid mobile device and is switched on, will receive SMS.
With SMS verification PHP API, we too provide source code in PHP language.
<?php function sendsmsGET($mobileNumber,$senderId,$routeId,$message,$serverUrl,$authKey) { $getData = ‘mobileNos=’.$mobileNumber.’&message=’.urlencode($message).’&senderId=’.$senderId.’&routeId=’. $routeId; //API URL $url=”http://”.$serverUrl.”/rest/services/sendSMS/sendGroupSms?AUTH_KEY=”.$authKey.”&”.$getData; // init the resource $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0 )); //get response $output = curl_exec($ch); //Print error if any if(curl_errno($ch)) { echo ‘error:’ . curl_error($ch); } curl_close($ch); return $output; } function sendsmsPOST($mobileNumber,$senderId,$routeId,$message,$serverUrl,$authKey) { //Prepare you post parameters $postData = array( ‘mobileNumbers’ => $mobileNumber, ‘smsContent’ => $message, ‘senderId’ => $senderId, ‘routeId’ => $routeId, “smsContentType” =>’english’ ); $data_json = json_encode($postData); $url=”http://”.$serverUrl.”/rest/services/sendSMS/sendGroupSms?AUTH_KEY=”.$authKey; // init the resource $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_HTTPHEADER => array(‘Content-Type: application/json’,’Content-Length: ‘ . strlen($data_json)), CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $data_json, CURLOPT_SSL_VERIFYHOST => 0, CURLOPT_SSL_VERIFYPEER => 0 )); //get response $output = curl_exec($ch); //Print error if any if(curl_errno($ch)) { echo ‘error:’ . curl_error($ch); } curl_close($ch); return $output; } ?> |
For more details contact us.