APIDoc

Did You Know?

Source Code

Bulk SMS API (POST)

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/sendsms.php
                                    

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 (,) sapreted phone num with Country code. EX: 923****25,923****97,923***68
sender Yes Enter your Mask name OR sender.
message Yes Enter your message content here.
oprater id Optional You can add oprater id.

Sample Code

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