Did You Know?

Source Code


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


Important Parameters

Follow the following parameters during SMS API Integration.

Parameters Requeired Where it
apikey Yes Get your api key from your Dashboard.
phone Yes Add your phone num with Country code. EX: 923354678925
sender Yes Enter your Mask name OR sender.
message Yes Enter your message content here.
oprater NO (Only for Converted Number) You can add oprater id. 1 to 5 (its only for Single SMS)
1 for Telenor, 2 for Jazz, 3 for Zong, 4 for Warid, 5 for Ufone

Sample Code

                                           $user_api   =    '******';
                                           $number     =    923001234567;
                                           $sender     =    'Your Mask';
                                           $message    =    'Test message from Hajana One';
                                           // sending sms
                                            $base_url = 'http://www.hajanaone.com/api/sendsms.php';
                                                curl_setopt($ch, CURLOPT_URL, $base_url);
                                                curl_setopt($ch, CURLOPT_POST, 1);
                                                curl_setopt($ch, CURLOPT_POSTFIELDS,
                                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                                $output = curl_exec($ch);
                                                curl_close ($ch);
                                                if (preg_match( "/successfully/", $output )){
                                                echo 'Message Sent Successfully';
                                                echo 'Message senging failed';