Source Code
Single Voive SMS API (GET)
Hajana One SMS API Support both GET method and POST method.You can integrate it easily and use for your Business.The below guide lines will help you.
Base URL
http://www.hajanaone.com/api/SendVoice.php
Important Parameters
Follow the following parameters during SMS API Integration.
Parameters | Requeired | Where it |
---|---|---|
apikey | Yes | Get your api key from your Dashboard. |
max_try | Yes | Define maximum retries 0-2 |
voice_id | Yes | Enter voice id |
phone | Yes | Enter phone number |
oprater id | Optional | You can add oprater id. |
Sample Code
<?php
$apikey = "ZJN*****vB";
$maxtry = "2";
$voiceid = "144";
$phone = "925468732558";
//Sending SMS
$url='https://www.hajanaone.com/api/SendVoice.php?apikey='.api$key.'&max_try='.$maxtry.'&voice_id='.$voiceid.'&phone='.$phone.';
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec ($ch);
echo $result;
?>
Complete API URL: http://www.hajanaone.com/api/SendVoice.php?apikey=e35******vt6&max_try=2&voice_id=144&phone=924568782345.
API RESPONSE
Success Response: success
At API: 101 : API Key Missing
At Maximum retries: 111 : Maximum retry option must be 0-2.
At Voice id: 112 : Voice File ID Missing
At Phone: 103 : Phone Number Missing