curl -X "POST" “https://thenux.com:5281/business/broadcast" \ -d “api_key=thenux_api_key” \ -d "business_id=xxxxx" \ -d “mobile_list=+60123456789,+601245556666” \ -d “tag=*destination_tag*” \ -d “message=message_to_send”
<?php $postvars = [ 'api_key' => "YOUR_API_KEY", 'business_id' => "YOUR_BUSINESS_ID", 'mobile_list' => array("phone_number_1","phone_number_2","phone_number_3"), 'tag' => "YOUR_TAG HERE", 'message' => "YOUR_MSG" ]; $url = "https://thenux.com:5281/business/broadcast"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST, 1); curl_setopt($ch,CURLOPT_POSTFIELDS,json_encode($postvars)); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3); curl_setopt($ch,CURLOPT_TIMEOUT, 20); $response = curl_exec($ch); curl_close ($ch); ?>
curl -X "POST" “https://thenux.com:5281/business/broadcast" \ -d “api_key=thenux_api_key” \ -d "business_id=xxxxx" \ <?php $ch = curl_init(); $postvars = [ 'api_key' => "YOUR_API_KEY", 'business_id' => "YOUR_BUSINESS_ID", 'mobile_list' => array("phone_number_1","phone_number_2","phone_number_3"), 'tag' => "YOUR_TAG HERE", 'message' => "YOUR_MSG" ]; $url = "https://thenux.com:5281/business/broadcast"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST, 1); //0 for a get request curl_setopt($ch,CURLOPT_POSTFIELDS,$postvars); curl_setopt($ch,CURLOPT_POST, 1); curl_setopt($ch,CURLOPT_POSTFIELDS,json_encode($postvars)); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3); curl_setopt($ch,CURLOPT_TIMEOUT, 20); ?> private void sendMessage() throws Exception { String url = "https://thenux.com:5281/business/broadcast"; URL obj = new URL(url); HttpsURLConnection con = (HttpsURLConnection) obj.openConnection(); }
<?php $ch = curl_init(); $postvars = [ 'api_key' => "YOUR_API_KEY", 'business_id' => "YOUR_BUSINESS_ID", 'mobile_list' => array("phone_number_1","phone_number_2","phone_number_3"), 'tag' => "YOUR_TAG HERE", 'message' => "YOUR_MSG" ]; $url = "https://thenux.com:5281/business/broadcast"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST, 1); //0 for a get request curl_setopt($ch,CURLOPT_POSTFIELDS,$postvars); curl_setopt($ch,CURLOPT_POST, 1); curl_setopt($ch,CURLOPT_POSTFIELDS,json_encode($postvars)); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3); curl_setopt($ch,CURLOPT_TIMEOUT, 20); ?> private void sendMessage() throws Exception { String url = "https://thenux.com:5281/business/broadcast"; URL obj = new URL(url); HttpsURLConnection con = (HttpsURLConnection) obj.openConnection(); }