API Documentation
[vc_row][vc_column width=”1/4″ el_id=”nav-docs” mobile_bg_img_hidden=”no” tablet_bg_img_hidden=”no” woodmart_parallax=”0″ woodmart_sticky_column=”false” parallax_scroll=”no” mobile_reset_margin=”no” tablet_reset_margin=”no”][vc_column_text text_larger=”no” css=”.vc_custom_1558231849369{margin-bottom: 20px !important;}”]AVAILABLE API[/vc_column_text][woodmart_list icon_fontawesome=”fa fa-angle-right” woodmart_css_id=”5cfdba4e88a44″ list=”%5B%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23send_message%5C%22%3ESend%20Text%20Message%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23send_message_split%5C%22%3ESend%20Split%20Text%20Message%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23send_group%5C%22%3ESend%20Message%20to%20Group%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23upload%5C%22%3EUpload%20Local%20Image%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23send_image%5C%22%3ESend%20Local%20Image%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23send_image_url%5C%22%3ESend%20External%20Image%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23send_image_url_no_upload%5C%22%3ESend%20External%20Image%20(Bypass)%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23file_upload%5C%22%3EUpload%20Local%20File%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23send_file%5C%22%3ESend%20Local%20File%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23%5C%22%3EUpload%20Chatbot%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23%5C%22%3EGet%20Chatbot%20List%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23%5C%22%3EDelete%20Chatbot%3C%2Fa%3E%22%7D%2C%7B%22list-content%22%3A%22%3Ca%20href%3D%5C%22%23%5C%22%3EGenerate%20Report%3C%2Fa%3E%22%7D%5D” css=”.vc_custom_1560132248285{margin-bottom: 5px !important;}”][/vc_column][vc_column width=”3/4″][vc_column_text text_larger=”no” el_id=”send_message” css=”.vc_custom_1560071834654{margin-bottom: 15px !important;}”]Send Text Message (/api/send_message)
Send new text message to a given phone number. This will initiate new chat if the number has never been contacted. If the number has been contacted before, text message will be added on the last chat.[/vc_column_text][vc_tta_tabs style=”modern” active_section=”1″][vc_tta_section title=”Sample Code” tab_id=”1560071090296-110cdaae-cfcb”][vc_column_text text_larger=”no” css=”.vc_custom_1568399043753{margin-bottom: 10px !important;}”]
<?php
$token = 'token-key';
$data = array(
'phone_no' => '+62812XXXXXXXX',
'key' => $token,
'message' => 'Hello World'
);
$data_string = json_encode($data);
$ch = curl_init('http://send.woonotif.com/api/send_message');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string)
)
);
$result = curl_exec($ch);
?>
[/vc_column_text][vc_column_text text_larger=”no”][alert-note]$token : Token Key, can be seen on the menu: Dashboard – License Key – Your Number – Token Key.[/alert-note][/vc_column_text][/vc_tta_section][vc_tta_section title=”Request Body Schema” tab_id=”1560060777906-40f8499f-c585″][vc_column_text text_larger=”no”]
| phone_no | required | Destination WhatsApp Number. Always use country code before number with (+) sign. |
| key | required | Your token key, can be seen on the menu: Dashboard – License Key – Your Number |
| message | required | Text message content to be sent. UTF-8 format and accept emoji. Use <ENTER> for new line. |
[/vc_column_text][/vc_tta_section][vc_tta_section title=”Response” tab_id=”1560060777953-2a23f739-d00b”][vc_column_text text_larger=”no”]
| success | Message successfully sent |
| Number not found | Number is not found, not valid, or not registered to WhatsApp |
| phone_offline | Sender phone is offline or not connected to internet |
[/vc_column_text][/vc_tta_section][/vc_tta_tabs][vc_separator css=”.vc_custom_1560071689424{margin-bottom: 15px !important;}”][vc_column_text text_larger=”no” el_id=”send_message_split” css=”.vc_custom_1560072036077{margin-bottom: 15px !important;}”]Send Split Text Message (/api/send_message_split)
Send new text message that splitted into several part to avoid “read more” on long message.[/vc_column_text][vc_tta_tabs style=”modern” active_section=”1″][vc_tta_section title=”Sample Code” tab_id=”1560071429694-78e54611-4847″][vc_column_text text_larger=”no” css=”.vc_custom_1568399088030{margin-bottom: 10px !important;}”]
<?php
$token = 'token-key';
$data = array(
'phone_no' => '+62812XXXXXXXX',
'key' => $token,
'message' => 'Hello World'
);
$data_string = json_encode($data);
$ch = curl_init('http://send.woonotif.com/api/send_message_split');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string)
)
);
$result = curl_exec($ch);
?>
[/vc_column_text][vc_column_text text_larger=”no”][alert-note]$token : Token Key, can be seen on the menu: Dashboard – License Key – Your Number – Token Key.[/alert-note][/vc_column_text][/vc_tta_section][vc_tta_section title=”Request Body Schema” tab_id=”1560071429816-d6e7dece-8c6a”][vc_column_text text_larger=”no”]
| phone_no | required | Destination WhatsApp Number. Always use country code before number with (+) sign. |
| key | required | Your token key, can be seen on the menu: Dashboard – License Key – Your Number |
| message | required | Text message content to be sent. UTF-8 format and accept emoji. Use <ENTER> for new line. |
[/vc_column_text][/vc_tta_section][vc_tta_section title=”Response” tab_id=”1560071429898-24a1de71-9f33″][vc_column_text text_larger=”no”]
| success | Message successfully sent |
| Number not found | Number is not found, not valid, or not registered to WhatsApp |
| phone_offline | Sender phone is offline or not connected to internet |
[/vc_column_text][/vc_tta_section][/vc_tta_tabs][vc_separator css=”.vc_custom_1560071729788{margin-bottom: 15px !important;}”][vc_column_text text_larger=”no” css=”.vc_custom_1560074012855{margin-bottom: 15px !important;}” el_id=”send_group”]Send Message to Group (/api/send_group)
Send new text message to a single WhatsApp group.[/vc_column_text][vc_tta_tabs style=”modern” active_section=”1″][vc_tta_section title=”Sample Code” tab_id=”1560073178780-9202adc0-c5f1″][vc_column_text text_larger=”no” css=”.vc_custom_1568399121844{margin-bottom: 10px !important;}”]
<?php
$token = 'token-key';
$data = array(
'group_name' => 'My Group Name',
'key' => $token,
'message' => 'Hello World'
);
$data_string = json_encode($data);
$ch = curl_init('http://send.woonotif.com/api/send_group');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string)
)
);
$result = curl_exec($ch);
?>
[/vc_column_text][vc_column_text text_larger=”no”][alert-note]$token : Token Key, can be seen on the menu: Dashboard – License Key – Your Number – Token Key.[/alert-note][/vc_column_text][/vc_tta_section][vc_tta_section title=”Request Body Schema” tab_id=”1560073178992-de658315-39e0″][vc_column_text text_larger=”no”]
| group_name | required | Destination WhatsApp Group Name. Case insensitive. |
| key | required | Your token key, can be seen on the menu: Dashboard – License Key – Your Number |
| message | required | Text message content to be sent. UTF-8 format and accept emoji. Use <ENTER> for new line. |
[/vc_column_text][/vc_tta_section][vc_tta_section title=”Response” tab_id=”1560073179131-65967068-bf42″][vc_column_text text_larger=”no”]
| success | Message successfully sent |
| group_not_found | Group name is not found |
| other_error | Unidentified error occured |
| phone_offline | Sender phone is offline or not connected to internet |
[/vc_column_text][/vc_tta_section][/vc_tta_tabs][vc_separator css=”.vc_custom_1560071729788{margin-bottom: 15px !important;}”][vc_column_text text_larger=”no” css=”.vc_custom_1560131579692{margin-bottom: 15px !important;}” el_id=”upload”]Upload Local Image (/api/upload)
Upload local image to WooNotif server before run “Send Local Image (/api/send_image)” API.[/vc_column_text][vc_tta_tabs style=”modern” active_section=”1″][vc_tta_section title=”Sample Code” tab_id=”1560131167180-97107e43-1324″][vc_column_text text_larger=”no” css=”.vc_custom_1568399161508{margin-bottom: 10px !important;}”]
<?php
$token = 'token-key';
$data = array(
'file' => 'ROOT_PATH/FileName.jpg'
);
$data_string = json_encode($data);
$ch = curl_init('http://send.woonotif.com/api/upload/'.$token);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string)
)
);
$result = curl_exec($ch);
?>
[/vc_column_text][vc_column_text text_larger=”no”][alert-note]$token : Token Key, can be seen on the menu: Dashboard – License Key – Your Number – Token Key.[/alert-note][/vc_column_text][/vc_tta_section][vc_tta_section title=”Request Body Schema” tab_id=”1560131167377-ba77d671-18be”][vc_column_text text_larger=”no”]
| file | required | Image URL with full root path to server. Example: /home/root/wp-content/uploads/FileName.jpg |
[/vc_column_text][/vc_tta_section][vc_tta_section title=”Response” tab_id=”1560131167517-f72d3d7c-ab72″][vc_column_text text_larger=”no”]
| FileName | Success response will return filename without extension. Example: ImageName.jpg -> ImageName |
[/vc_column_text][/vc_tta_section][/vc_tta_tabs][vc_separator css=”.vc_custom_1560071729788{margin-bottom: 15px !important;}”][/vc_column][/vc_row]
