NAV Navbar
php

Introduction

Sample Demo Send Message Script

$key_demo='db63f52c1a00d33cf143524083dd3ffd025d672e255cc688';
$url='https://go.woo-wa.com/demo/send_message';
$data = array(
    "phone_no"=> '+628975835238',
    "key"     => $key_demo,
    "message" => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);

$data_string = json_encode($data,1);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string),
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));
echo $res=curl_exec($ch);
curl_close($ch);

Welcome to the Woowa API V3.0! You can use our API to access Woowa API endpoints, which can send message,image also file and get information of your account at my.woo-wa.com.

We have language bindings in PHP! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

This is Demo account to try our API

license : 5c286f20169dd
key : db63f52c1a00d33cf143524083dd3ffd025d672e255cc688

You can get new data account (token) at https://woo-wa.com

Woowa Server (web.whatsapp in woowa server)

Send WA

Send Message Sync

Sample Script

$key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/send_message';
$data = array(
  "phone_no"  => '+628975835238',
  "key"       => $key,
  "message"   => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "skip_link" => True // This optional for skip snapshot of link in message
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

Response:

success

This endpoint is used to send text message.

HTTP Request

POST http://116.203.191.58/api/send_message

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
message text to be sent.
skip_link This optional for skip snapshot of link in message

Response

String Description
success Text sent successfully.
phone_offline Number is offline.
[20190909143509] Number not found Number not found.

Send Message Async

Sample Script

$key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/async_send_message';
$data = array(
  "phone_no"  => '+628975835238',
  "key"       => $key,
  "message"   => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "skip_link" => True // This optional for skip snapshot of link in message
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

Response:

15683286008530

This endpoint is used to send text message.

HTTP Request

POST http://116.203.191.58/api/async_send_message

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
message text to be sent.
skip_link This optional for skip snapshot of link in message

Response

String Description
15683286008530 ID queue

Send Image Sync

Sample Script

$key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/send_image_url';
$img_url='https://app.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png';
$data = array(
  "phone_no"  => '+628975835238',
  "key"       => $key,
  "url"       => $img_url,
  "message"   => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

Response:

1

This endpoint is used to send image message.

HTTP Request

POST http://116.203.191.58/api/send_image_url

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
url URL image to be sent.
message Caption of image.

Response

String Description
1 The message success send.
0 The message failed send.
phone_offline Phone is offline.
[20190909143509] Number not found Phone number is not found.

Send Image Async

Sample Script

$key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/async_send_image_url';
$img_url='https://app.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png';
$data = array(
  "phone_no"  => '+628975835238',
  "key"       => $key,
  "url"       => $img_url,
  "message"   => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

Response:

15683286008531

This endpoint is used to send image message.

HTTP Request

POST http://116.203.191.58/api/async_send_image_url

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
url URL image to be sent.
message Caption of image.

Response

String Description
15683286008530 ID Queue.

Send File Sync

Sample Script

$key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/send_file_url';
$file_path='https://my.woo-wa.com/wp-content/uploads/2018/12/dokumen.pdf';
$data = array(
  "phone_no"  => '+628975835238',
  "key"       => $key,
  "url"       => $file_path
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

Response:

success

This endpoint is used to send image message.

HTTP Request

POST http://116.203.191.58/api/send_file_url

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
url URL file to be sent.

Response

String Description
success The message success send.
phone_offline Phone is offline.
[20190909143509] Number not found Phone number is not found.

Send File Async

Sample Script

$key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/async_send_file_url';
$file_path='https://my.woo-wa.com/wp-content/uploads/2018/12/ducument.pdf';
$data = array(
  "phone_no"  => '+628975835238',
  "key"       => $key,
  "url"       => $file_path
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

Response:

15683286008530

This endpoint is used to send image message.

HTTP Request

POST http://116.203.191.58/api/async_send_file_url

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
url URL file to be sent.

Response

String Description
15683286008530 ID Queue.

Send WA to Group

Send WA to Group Sync

Sample Script

$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/send_group';
$data = array(
  "group_name"  => 'tes grup',
  "key"         => $key,
  "message"     => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

success

This endpoint is used to send text message to group.

HTTP Request

http://116.203.191.58/api/send_group

POST Parameters

Parameter Description
group_name Group name.
key Key partner.
message Text to be sent.

Response:

String Description
success Text sent succesfully.
group_not_found Group not found.
other_error Error not identified.
phone_offline Phone offline.

Send WA to Group Async

Sample Script

$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/async_send_group';
$data = array(
  "group_name"=> 'tes grup',
  "key"     =>$key,
  "message" =>'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

158107xxxxxx

This endpoint is used to send text message to group.

HTTP Request

http://116.203.191.58/api/async_send_group

POST Parameters

Parameter Description
group_name Group name.
key Key partner.
message Text to be sent.

Response:

String Description
message_id Message ID.

Send WA to Group (Group ID) Sync

Sample Script

$group_id = 'xxxxLFZIhPC3I7ce0W5uk';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/send_message_group_id';
$data = array(
  "group_id" =>$group_id,
  "key"     =>$key,
  "message" =>'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

success

This endpoint is used to send text message to group.

HTTP Request

http://116.203.191.58/api/send_message_group_id

POST Parameters

Parameter Description
group_id Group ID.
key Key partner.
message Text to be sent.

Response

String Description
success Text sent succesfully.
group_not_found Group not found.
other_error Error not identified.
phone_offline Phone offline.

Send WA to Group (Group ID) Async

Sample Script

$group_id = 'xxxxLFZIhPC3I7ce0W5uk';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/async_send_message_group_id';
$data = array(
  "group_id" =>$group_id,
  "key"       =>$key,
  "message" =>'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

158107xxxxxx

This endpoint is used to send text message to group.

HTTP Request

http://116.203.191.58/api/async_send_message_group_id

POST Parameters

Parameter Description
group_id Group ID.
key Key partner.
message Text to be sent.

Response

String Description
message_id Message ID.

Send Image to Group Sync

Sample Script

$group_id = 'xxxxLFZIhPC3I7ce0W5uk';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/send_image_url_group_id';
$img_url='https://app.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png';
$data = array(
  "group_id" =>$group_id,
  "key"       =>$key,
  "url"       =>$img_url,
  "message" =>'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

success

This endpoint is used to send image to group.

HTTP Request

http://116.203.191.58/api/send_image_url_group_id

POST Parameters

Parameter Description
group_id Group ID.
key Key partner.
url URL image to be sent.
message Caption of image.

Response

String Description
success Text sent succesfully.
group_not_found Group not found.
other_error Error not identified.
phone_offline Phone offline.

Send Image to Group Async

Sample Script

$group_id = 'xxxxLFZIhPC3I7ce0W5uk';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/async_send_image_url_group_id';
$img_url='https://app.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png';
$data = array(
  "group_id" =>$group_id,
  "key"       =>$key,
  "url"       =>$img_url,
  "message" =>'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

158107xxxxxx

This endpoint is used to send image to group.

HTTP Request

http://116.203.191.58/api/async_send_image_url_group_id

POST Parameters

Parameter Description
group_id Group ID.
key Key partner.
url URL image to be sent.
message Caption of image.

Response

String Description
message_id Message ID

Send File to Group Sync

Sample Script

$group_id = 'xxxxLFZIhPC3I7ce0W5uk';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/send_file_url_group_id';
$img_url='https://my.woo-wa.com/wp-content/uploads/2018/12/document.pdf';
$data = array(
  "group_id" =>$group_id,
  "key"       =>$key,
  "url"       =>$img_url
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

success

This endpoint is used to send file to group.

HTTP Request

http://116.203.191.58/api/send_file_url_group_id

POST Parameters

Parameter Description
group_id Group ID.
key Key partner.
url URL image to be sent.
message Caption of image.

Response

String Description
success Text sent succesfully.
group_not_found Group not found.
other_error Error not identified.
phone_offline Phone offline.

Send File to Group Async

Sample Script

$group_id = 'xxxxLFZIhPC3I7ce0W5uk';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/async_send_file_url_group_id';
$img_url='https://my.woo-wa.com/wp-content/uploads/2018/12/document.pdf';
$data = array(
  "group_id" =>$group_id,
  "key"       =>$key,
  "url"       =>$img_url
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

158107xxxxxx

This endpoint is used to send file to group.

HTTP Request

http://116.203.191.58/api/async_send_file_url_group_id

POST Parameters

Parameter Description
group_id Group ID.
key Key partner.
url URL image to be sent.
message Caption of image.

Response

String Description
messasge_id Message ID

Schedule

Scheduler

Sample Script

$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/scheduler';
$img_url='https://app.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png';
$data = array(
  "phone_no" =>'phone number',
  "key"       =>$key,
  "sch_date" =>'2019-12-01 21:00',
  "api_type" =>'image_text', // (text, image_text, image, file)
  "message" =>'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "url"       =>$img_url
);

$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

158107xxxxxx

This endpoint is used schedule send wa. This API has a limitation that is a maximum of 3 messages / minute that can be set, so that the next message is set at different minutes. The time zone used is UTC + 7 (WIB). So it is conditioned by this time zone

HTTP Request

http://116.203.191.58/api/scheduler

POST Parameters

Parameter Description
phone_no Group ID.
key Key partner.
sch_date Date ex.(2019-12-01 21:00).
api_type API type (text, image_text, image, file).
message Message / Caption of image.
url URL image to be sent.

Response

String Description
msg_id Message ID / Schedule ID

Check Scheduler

Sample Script

$message_id = '67435xxx';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/sch_check';
$data = array(
  "msg_id" =>$message_id,
  "key"    =>$key
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

{
  "status": "success",
  "data": [
    {
      "status": "number_not_found",
      "sys_creation_date": "2020-01-20 21:58:27",
      "target": "6289580xxxxx",
      "sch_date": "2020-01-20 21:59:00",
      "msg_id": "157953230xxxxx",
      "filename": null,
      "status_msg_id": "15795325xxxxx",
      "message": "Test Message,Please don\'t reply.",
      "api_type": "send_message"
    }
  ]
}

This endpoint is used to check scheduler.

HTTP Request

http://116.203.191.58/api/sch_check

POST Parameters

Parameter Description
msg_id Message ID.
key Key partner.

Response

JSON Attributes Description
msg_id Message ID
api_type API type
message Text message
target Target Number
status Status message
filename Filename
sch_date Date (scheduler)
sys_creation_date Date (creation)

Remove Scheduler

Sample Script

$message_id = '67435xxx';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/sch_remove';
$data = array(
  "msg_id" =>$message_id,
  "key"    =>$key
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

{
  "status": "success",
  "data": [
    {
      "status": "number_not_found",
      "sys_creation_date": "2020-01-20 21:58:27",
      "target": "6289580xxxxx",
      "sch_date": "2020-01-20 21:59:00",
      "msg_id": "157953230xxxxx",
      "filename": null,
      "status_msg_id": "15795325xxxxx",
      "message": "Test Message,Please don\'t reply.",
      "api_type": "send_message"
    }
  ]
}

This endpoint is used to remove schedule.

HTTP Request

http://116.203.191.58/api/sch_remove

POST Parameters

Parameter Description
msg_id Message ID.
key Key partner.

Response

JSON Attributes Description
msg_id Message ID
api_type API type
message Text message
target Target Number
status Status message
filename Filename
sch_date Date (scheduler)
sys_creation_date Date (creation)

Check Number

Sample Script

$phone_no = '67435xxx';
$key='c89f46e40932f9866b52fe07b184da5f730baa5f87a0d3ed'; //this is demo key please change with your own key
$url='http://116.203.191.58/api/check_number';
$data = array(
  "phone_no" => $phone_no,
  "key"    => $key
);
$data_string = json_encode($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json',
  'Content-Length: ' . strlen($data_string))
);
echo $res=curl_exec($ch);
curl_close($ch);

response

exists

This endpoint is used to check number status.

HTTP Request

http://116.203.191.58/api/check_number

POST Parameters

Parameter Description
phone_no Whatsapp Number
key Key Pelanggan

Response

String Description
exists Number exists
not_exists Number not exists
unknow Number unknow

Web Hook

Set Webhook

Sample Script

$data["license"]="5c286f1ed7121";
$data["url"]    ="https://yourwebsite.com/listen.php"; // message data will push to this url
$data["no_wa"]  = "6289648615564";    //sender number registered in woowa
$data["action"] = "set";

$url="http://api.woo-wa.com/v2.0/webhook";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$err = curl_error($ch);
curl_close ($ch);
if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $result;
}

Response:

{
  "status": "success",
  "message": "http://yourwebsite.com/listen.php",
}

This endpoint is used set webhook.

HTTP Request

POST http://api.woo-wa.com/v2.0/webhook

POST Parameters

Parameter Description
url Incoming message will push to this url.
license Woo-wa license key.
action Webhook action.
no_wa sender number registeres in woowa.

Response

JSON Attribute Description
status Status message.
message Url to listen the message.

Get Webhook

Sample Script

$data["license"]="5c286f1ed7121";
$data["url"]>    ="https://yourwebsite.com/listen.php"; // message data will push to this url
$data["no_wa"]  = "6289648615564";    //sender number registered in woowa
$data["action"] = "get";

$url="http://api.woo-wa.com/v2.0/webhook";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$err = curl_error($ch);
curl_close ($ch);
if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $result;
}

Response:

{
  "status": "success",
  "message": "http://yourwebsite.com/listen.php",
}

This endpoint is used get webhook.

HTTP Request

POST http://api.woo-wa.com/v2.0/webhook

POST Parameters

Parameter Description
url Incoming message will push to this url.
license Woo-wa license key.
action Webhook action.
no_wa Sender number registeres in woowa.

Response

JSON Attribute Description
status Status message.
message Url to listen the message.

Unset Webhook

Sample Script

$data["license"]="5c286f1ed7121";
$data["url"]>    ="https://yourwebsite.com/listen.php"; // message data will push to this url
$data["no_wa"]  = "6289648615564";    //sender number registered in woowa
$data["action"] = "unset";

$url="http://api.woo-wa.com/v2.0/webhook";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$err = curl_error($ch);
curl_close ($ch);
if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $result;
}

Response:

{
  "status": "success",
  "message": "unset success",
}

This endpoint is used to unset webhook.

HTTP Request

POST http://api.woo-wa.com/v2.0/webhook

POST Parameters

Parameter Description
url Incoming message will push to this url.
license Woo-wa license key.
action Webhook action.
no_wa Sender number registeres in woowa.

Response

JSON Attribute Description
status Status message.
message Url to listen the message.

Get Data

Sample PHP Script for Listening data:

$json = file_get_contents('php://input');
$data = json_decode($json);

file_put_contents("listen.txt", print_r($data,1));

Format data from webhook:

(
    [contact_name] => +628975835238 
    [ip_server] => 116.203.191.58
    [message] => Lix
    [keyword] => default
    [port] => 3787
)

This endpoint is used to get data webhook.

Woowa Multics API

Message

Send Message

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$url='https://multics.woo-wa.com/api/srv1/send-text';
$data = array(
  "number"  => '+628975835238',
  "message" => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan'
);
$data_string = http_build_query($data,1);

$ch = curl_init($url);
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, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "device-key: $device_key",
    'Content-Type: application/x-www-form-urlencoded'
));
echo $result = curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "288b996f-69da-4d57-815e-fdb7342ba012",
        "device_id": "4",
        "message": "DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan",
        "number": "+628975835238",
        "type": "text",
        "updated_at": "2021-06-04 01:35:53"
    }
}

This endpoint is used to send text message.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/send-text

HTTP Headers

Parameter Value
device-key device-key
Content-Type application/x-www-form-urlencoded

POST Parameters

Parameter Description
number Client's whatsapp number.
message text to be sent.

Response

JSON Attributes Description
status status code.
message message status.
data data response.
device_id device id.
number target number.
message message to be sent.
chat_id chat_id
type type message
from_me message from me
from_group message from group
api message from api
created_at message created_at
updated_at message updated_at
id data id

Send Message Image/File URL

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$url='https://multics.woo-wa.com/api/srv1/send-media-url';
$data = array(
  "number"  => '+628975835238',
  "message" => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "media_url" => "https://app.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png",
  "type" => "image", // text, image, document
);
$data_string = http_build_query($data,1);

$ch = curl_init($url);
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, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "device-key: $device_key",
    'Content-Type: application/x-www-form-urlencoded'
));
echo $result = curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "f2564e6a-e3d7-4a68-990c-xxxxxxxx",
        "device_id": "189",
        "message": "Testt!",
        "number": "628228054xxxx",
        "type": "image",
        "updated_at": "2021-07-29 13:26:56"
    }
}

This endpoint is used to send text message with image url.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/send-media-url

HTTP Headers

Parameter Value
device-key device-key
Content-Type application/x-www-form-urlencoded

POST Parameters

Parameter Description
number Client's whatsapp number.
message text to be sent.
media_url image/file url to be sent.
type type media to be sent. ex: text/image/document

Response

JSON Attributes Description
status status code.
message message status.
data data response.
id device key.
device_id device id.
message message to be sent.
number target number.
type type message
updated_at message updated_at

Send Message Image/File

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$url='https://multics.woo-wa.com/api/srv1/send-media';
$data = array(
  "number"  => '+628975835238',
  "message" => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "image" => "Attach your image file!",
  "type" => "image", // text, image, document
);
$data_string = http_build_query($data,1);

$ch = curl_init($url);
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, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "device-key: $device_key",
    'Content-Type: application/x-www-form-urlencoded'
));
echo $result = curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "f2564e6a-e3d7-4a68-990c-xxxxxxxx",
        "device_id": "189",
        "message": "Testt!",
        "number": "628228054xxxx",
        "type": "image",
        "updated_at": "2021-07-29 13:26:56"
    }
}

This endpoint is used to send text message with image file.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/send-media

HTTP Headers

Parameter Value
device-key device-key
Content-Type application/x-www-form-urlencoded

POST Parameters

Parameter Description
number Client's whatsapp number.
message text to be sent.
media attach image/file to be sent.
type type media to be sent. ex: text/image/document

Response

JSON Attributes Description
status status code.
message message status.
data data response.
id device key.
device_id device id.
message message to be sent.
number target number.
type type message
updated_at message updated_at

Message Group

Send Message Group Text

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$url='https://multics.woo-wa.com/api/srv1/send-text';
$data = array(
  "number"  => '+628975835238-16219290xx', // use this api group list
  "message" => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "group" => 1 // 1 = true, 0 = false
);
$data_string = http_build_query($data,1);

$ch = curl_init($url);
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, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "device-key: $device_key",
    'Content-Type: application/x-www-form-urlencoded'
));
echo $result = curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "288b996f-69da-4d57-815e-fdb7342ba012",
        "device_id": "4",
        "message": "DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan",
        "number": "628975835238-16219290xx",
        "type": "text",
        "updated_at": "2021-06-04 01:35:53"
    }
}

This endpoint is used to send text message to group.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/send-text

HTTP Headers

Parameter Value
device-key device-key
Content-Type application/x-www-form-urlencoded

POST Parameters

Parameter Description
number Client's whatsapp number. use this api group list
message text to be sent.
group message send to group.

Response

JSON Attributes Description
status status code.
message message status.
data data response.
device_id device id.
number target number.
message message to be sent.
chat_id chat_id
type type message
from_me message from me
from_group message from group
api message from api
created_at message created_at
updated_at message updated_at
id data id

Send Message Group Image/File URL

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$url='https://multics.woo-wa.com/api/srv1/send-media-url';
$data = array(
  "number"  => '+628975835238-16219290xx', // use this api group list
  "message" => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "group" => 1, // 1 = true, 0 = false
  "image_url" => "https://app.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png",
  "type" => "image" // text, image, document
);
$data_string = http_build_query($data,1);

$ch = curl_init($url);
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, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "device-key: $device_key",
    'Content-Type: application/x-www-form-urlencoded'
));
echo $result = curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "66830b9e-e36d-452b-a7a0-xxxxx",
        "device_id": "321",
        "message": "Haloo!",
        "number": "6285157408779-1627568xxx",
        "type": "image",
        "updated_at": "2021-07-29 14:49:58"
    }
}

This endpoint is used to send text message to group with image url.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/send-media-url

HTTP Headers

Parameter Value
device-key device-key
Content-Type application/x-www-form-urlencoded

POST Parameters

Parameter Description
number Client's whatsapp number. use this api group list
message text to be sent.
image_url image url to be send to group.
type type file to be send to group. ex: text/image/document
group type send, if grup set 1, if personal chat set 0, or remove this param

Response

JSON Attributes Description
status status code.
message message status.
data data response.
id device_key.
device_id device id.
message message to be sent.
number target number.
type type message
updated_at message updated_at

Send Message Group Image/File

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$url='https://multics.woo-wa.com/api/srv1/send-media';
$data = array(
  "number"  => '+628975835238-16219290xx', // use this api group list
  "message" => 'DEMO AKUN WOOWA. tes woowa api v3.0 mohon di abaikan',
  "group" => 1, // 1 = true, 0 = false
  "image" => "Atta your image file!",
  "type" => "image" // text, image, document
);
$data_string = http_build_query($data,1);

$ch = curl_init($url);
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, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "device-key: $device_key",
    'Content-Type: application/x-www-form-urlencoded'
));
echo $result = curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "66830b9e-e36d-452b-a7a0-xxxxx",
        "device_id": "321",
        "message": "Haloo!",
        "number": "6285157408779-1627568xxx",
        "type": "image",
        "updated_at": "2021-07-29 14:49:58"
    }
}

This endpoint is used to send text message to group with image file.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/send-media

HTTP Headers

Parameter Value
device-key device-key
Content-Type application/x-www-form-urlencoded

POST Parameters

Parameter Description
number Client's whatsapp number. use this api group list
message text to be sent.
image attach image file to be send to group.
type type file to be send to group. ex: text/image/document
group type send, if grup set 1, if personal chat set 0, or remove this param

Response

JSON Attributes Description
status status code.
message message status.
data data response.
id device_key.
device_id device id.
message message to be sent.
number target number.
type type message
updated_at message updated_at

Group List

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$url='https://multics.woo-wa.com/api/srv1/groups';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'device-key: '.$device_key
));
echo $res=curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": [
        {
            "id": "d8b84015-6440-4162-a5cc-42d7ea499105",
            "number": "628975835238-16182195xx",
            "name": "Test grup"
        },
        {
            "id": "bb651d09-3961-4472-b858-abcf0ea66d71",
            "number": "628975835238-16219290xx",
            "name": "Test Multics"
        }
    ]
}

This endpoint is used to get group list.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/groups

HTTP Headers

Parameter Value
device-key device-key

Response

JSON Attributes Description
status status code.
message message status.
data data response.
id data id
number group number.
name group name.

Chat History

Sample Script

$device_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo device_key please change with your own device_key
$license = "602dc37xxxxx";
$data = [
  'start_date'    => "2021-06-03",
  'end_date'      => "2021-06-04",
  'search'        => '',
  'order'         => 'asc', // asc/desc
  'page'          => 1,
  'per_page'      => 20
];
$data_string = http_build_query($data);

// $data_string is optional
$url="https://multics.woo-wa.com/api/srv1/history-chat/$license?$data_string";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'device-key: '.$device_key
));
echo $res=curl_exec($ch);
curl_close($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": [
        {
            "id": "092bb5d6-500b-4db5-a330-c977d8c41e82",
            "msg_id": "3EB0B9B2FCAE",
            "user_id": null,
            "chat_id": "d5dbb1fd-f67c-46a1-8e69-a499095acf03",
            "device_id": "4",
            "number": "6289606526604",
            "name": "Aku",
            "from_group": false,
            "from_me": true,
            "from_story": false,
            "message": "setenga jam test",
            "media_url": null,
            "type": "text",
            "reply_for": null,
            "failed_reason": null,
            "timestamp": "2021-06-01T06:53:36.000Z",
            "status": "DELIVERED",
            "api": true,
            "created_at": "2021-06-01 06:53:36",
            "updated_at": "2021-06-01 06:53:39"
        }
    ],
    "paginate": {
        "total": "1",
        "perPage": 20,
        "page": 1,
        "lastPage": 1
    }
}

This endpoint is used to get history chat.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/history-chat/602dc37xxxxx?start_date=2021-06-01&end_date=2021-06-03&search=&order=asc&page=1&per_page=20

HTTP Headers

Parameter Value
device-key device key

HTTP query

Parameter Description
start_date Start date
end_date End date
search Search some message
order Sort history by asc or desc
page Page number
per_page Limit data in 1 page

Response

JSON Attributes Description
status Status code.
message Message status.
data Data response.
id Data id.
msg_id Message id.
user_id Message user_id
chat_id Chat ID
device_id Device ID
number Target number
name Target name
from_group Message from group
from_me Message from me
from_story Message from story
message Message text
media_url Media_url if send media
type Message type
reply_for Message reply_for
failed_reason Message failed_reason
timestamp Message timestamp
status Message status
- DELIVERED
- PENDING
- SENT
- FAILED
api Message from api
created_at Message created_at
updated_at Message updated_at
paginate Data pagination
total Total message
perPage Total per page
page Current page
lastPage Last page

Bot

Set Bot

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';
$data = array(
    "keyword" => "hey",
    "type" => "exact match", // 'exact match', 'start with', 'contain'
    "response" => "hello"
);

$data_string = http_build_query($data);
$url = 'https://multics.woo-wa.com/api/srv1/bots';

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key,
    'Content-Type: application/x-www-form-urlencoded'
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "keyword": "hey",
        "type": "exact match",
        "response": "hello",
        "created_at": "2021-06-09 03:58:32",
        "updated_at": "2021-06-09 03:58:32",
        "id": "6"
    }
}

This endpoint is used to add bot.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/bots

POST Headers

Parameter Description
device-key Device Key
Content-Type application/x-www-form-urlencoded

POST Parameters

Parameter Description
keyword Keywoard message from sender
type Bot type
- exact match, Keyword equals input
- start with, Keyword is similar to the beginning of the input
- contain, Keyword is similar to what is in the input
response Response message sent to sender

Response

Parameter Description
status Status code
message Message status
data Data sent to api
keyword Data keyword sent to api
type Data type sent to api
response Data response sent to api
created_at Data created_at
updated_at Data updated_at
id Data ID
paginate Data pagination
total Total message
perPage Total per page
page Current page
lastPage Last page

Get Bot

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';
$data = array(
    "page" => 1
);

$data_string = http_build_query($data);
$url = 'https://multics.woo-wa.com/api/srv1/bots';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key,
    'Content-Type: application/x-www-form-urlencoded'
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": [
        {
            "id": "1",
            "sender": null,
            "keyword": "hey",
            "type": "exact match",
            "response": "hello",
            "created_at": "2021-06-09 03:58:32",
            "updated_at": "2021-06-09 03:58:32",
            "case_sensitive": null,
            "personal_only": null
        }
    ],
    "paginate": {
        "total": "1",
        "perPage": 20,
        "page": 1,
        "lastPage": 1
    }
}

This endpoint is used to get bot.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/bots

HTTP Headers

Parameter Description
device-key Device Key
Content-Type application/x-www-form-urlencoded

HTTP Query

Parameter Description
page Page number

Response

Parameter Description
status Status code
message Message status
data Data sent to api
id Data ID
sender Number sender
keyword Data keyword sent to api
type Data type sent to api
response Data response sent to api
created_at Data created_at
updated_at Data updated_at
case_sensitive Data case_sensitive
personal_only Data personal_only

Update Bot

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';
$data = array(
    "keyword" => "hey",
    "type" => "exact match", // 'exact match', 'start with', 'contain'
    "response" => "hello"
);
$id = 1; // id bot from api get bot

$data_string = http_build_query($data);
$url = 'https://multics.woo-wa.com/api/srv1/bots/'.$id;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key,
    'Content-Type: application/x-www-form-urlencoded'
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "1",
        "sender": "628975835238",
        "keyword": "hey",
        "type": "exact match",
        "response": "hello",
        "created_at": "2021-06-10 01:34:40",
        "updated_at": "2021-06-10 01:36:55",
        "case_sensitive": null,
        "personal_only": null,
        "device_id": "4"
    }
}

This endpoint is used to update bot.

HTTP Request

PUT https://multics.woo-wa.com/api/srv1/bots/$id

HTTP Headers

Parameter Description
device-key Device Key
Content-Type application/x-www-form-urlencoded

PUT Parameters

Parameter Description
keyword Keywoard message from sender
type Bot type
- exact match, Keyword equals input
- start with, Keyword is similar to the beginning of the input
- contain, Keyword is similar to what is in the input
response Response message sent to sender

Response

Parameter Description
status Status code
message Message status
data Data sent to api
id Data ID
sender Data Sender
keyword Data keyword sent to api
type Data type sent to api
response Data response sent to api
created_at Data created_at
updated_at Data updated_at
case_sensitive Data case_sensitive
personal_only Data personal_only
device_id Data device_id

Delete Bot

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';
$id = 1; // id bot from api get bot

$url = 'https://multics.woo-wa.com/api/srv1/bots/'.$id;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "1",
        "sender": "628975835238",
        "keyword": "hey",
        "type": "exact match",
        "response": "hello",
        "created_at": "2021-06-10 01:34:40",
        "updated_at": "2021-06-10 01:36:55",
        "case_sensitive": null,
        "personal_only": null,
        "device_id": "4"
    }
}

This endpoint is used to delete bot.

HTTP Request

DELETE https://multics.woo-wa.com/api/srv1/bots/$id

HTTP Headers

Parameter Description
device-key Device Key

POST Parameters

Parameter Description
keyword Keywoard message from sender
type Bot type
- exact match, Keyword equals input
- start with, Keyword is similar to the beginning of the input
- contain, Keyword is similar to what is in the input
response Response message sent to sender

Response

Parameter Description
status Status code
message Message status
data Data sent to api
id Data ID
sender Data Sender
keyword Data keyword sent to api
type Data type sent to api
response Data response sent to api
created_at Data created_at
updated_at Data updated_at
case_sensitive Data case_sensitive
personal_only Data personal_only
device_id Data device_id

Web Hook

Add Webhook

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';
$data = array(
    "name"      => "example",
    "url"       => "yourwebsite.com/listen.php",
    "qrcode"    => false,   // true/false
    "paired"    => false,   // true/false
    "unpaired"  => false,   // true/false
    "battery"   => false,   // true/false
    "message"   => true,    // true/false
    "misscall"  => false    // true/false
);
$data_string = json_encode($data,1);

$url = 'https://multics.woo-wa.com/api/srv1/device/webhook';

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key,
    'Content-Type: application/json'
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "name": "example",
        "url": "yourwebsite.com/listen.php",
        "qrcode": false,
        "paired": false,
        "unpaired": false,
        "battery": false,
        "message": true,
        "misscall": false,
        "device_id": "4",
        "created_at": "2021-06-10 05:10:38",
        "updated_at": "2021-06-10 05:10:38",
        "id": "4"
    }
}

This endpoint is used to add webhook.

HTTP Request

POST https://multics.woo-wa.com/api/srv1/device/webhook

HTTP Headers

Parameter Description
device-key Device Key
Content-Type application/json

POST Parameters

Parameter Description
name Webhook name
url Webhook url
qrcode Webhook send data on event qrcode value true/false
paired Webhook send data on event paired value true/false
unpaired Webhook send data on event unpaired value true/false
battery Webhook send data on event battery value true/false
message Webhook send data on event message value true/false
misscall Webhook send data on event misscall value true/false

Response

Parameter Description
status Status code
message Message status
data Data sent to api
name Data name webhook
url Data url webhook
qrcode Data qrcode webhook
paired Data paired webhook
unpaired Data unpaired webhook
battery Data battery webhook
message Data message webhook
misscall Data misscall webhook
device_id Data device_id webhook
created_at Data created_at webhook
updated_at Data updated_at webhook
id Data id webhook

Get Webhook

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';
$url = 'https://multics.woo-wa.com/api/srv1/device/webhook';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": [
        {
            "name": "example",
            "url": "yourwebsite.com/listen.php",
            "qrcode": false,
            "paired": false,
            "unpaired": false,
            "battery": false,
            "message": true,
            "misscall": false,
            "device_id": "4",
            "created_at": "2021-06-10 05:10:38",
            "updated_at": "2021-06-10 05:10:38",
            "id": "4"
        }
    ]
}

This endpoint is used to get webhook.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/device/webhook

HTTP Headers

Parameter Description
device-key Device Key

Response

Parameter Description
status Status code
message Message status
data Data sent to api
name Data name webhook
url Data url webhook
qrcode Data qrcode webhook
paired Data paired webhook
unpaired Data unpaired webhook
battery Data battery webhook
message Data message webhook
misscall Data misscall webhook
device_id Data device_id webhook
created_at Data created_at webhook
updated_at Data updated_at webhook
id Data id webhook

Update Webhook

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';
$id = 1; // id webhook from api get webhook
$data = array(
    "name"      => "example",
    "url"       => "yourwebsite.com/listen.php",
    "qrcode"    => false,   // true/false
    "paired"    => false,   // true/false
    "unpaired"  => false,   // true/false
    "battery"   => false,   // true/false
    "message"   => true,    // true/false
    "misscall"  => false    // true/false
);
$data_string = json_encode($data,1);

$url = 'https://multics.woo-wa.com/api/srv1/device/webhook/'.$id;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key,
    'Content-Type: application/json'
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "4",
        "device_id": "4",
        "name": "sipu-sipu",
        "url": "sipu-sipu.com",
        "qrcode": false,
        "paired": false,
        "unpaired": false,
        "battery": true,
        "message": true,
        "misscall": false,
        "created_at": "2021-06-10 05:10:38",
        "updated_at": "2021-06-10 07:56:11"
    }
}

This endpoint is used to add webhook.

HTTP Request

PUT https://multics.woo-wa.com/api/srv1/device/webhook/$id

HTTP Headers

Parameter Description
device-key Device Key
Content-Type application/json

POST Parameters

Parameter Description
name Webhook name
url Webhook url
qrcode Webhook send data on event qrcode value true/false
paired Webhook send data on event paired value true/false
unpaired Webhook send data on event unpaired value true/false
battery Webhook send data on event battery value true/false
message Webhook send data on event message value true/false
misscall Webhook send data on event misscall value true/false

Response

Parameter Description
status Status code
message Message status
data Data sent to api
id Data id webhook
device_id Data device_id webhook
name Data name webhook
url Data url webhook
qrcode Data qrcode webhook
paired Data paired webhook
unpaired Data unpaired webhook
battery Data battery webhook
message Data message webhook
misscall Data misscall webhook
device_id Data device_id webhook
created_at Data created_at webhook
updated_at Data updated_at webhook

Delete Webhook

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';

$id = 1; // id webhook from api get webhook
$url = 'https://multics.woo-wa.com/api/srv1/device/webhook/'.$id;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "name": "example",
        "url": "yourwebsite.com/listen.php",
        "qrcode": false,
        "paired": false,
        "unpaired": false,
        "battery": false,
        "message": true,
        "misscall": false,
        "device_id": "4",
        "created_at": "2021-06-10 05:10:38",
        "updated_at": "2021-06-10 05:10:38",
        "id": "4"
    }
}

This endpoint is used to delete webhook.

HTTP Request

DELETE https://multics.woo-wa.com/api/srv1/device/webhook/$id

HTTP Headers

Parameter Description
device-key Device Key

POST Parameters

Parameter Description
id Webhook id

Response

Parameter Description
status Status code
message Message status
data Data sent to api
name Data name webhook
url Data url webhook
qrcode Data qrcode webhook
paired Data paired webhook
unpaired Data unpaired webhook
battery Data battery webhook
message Data message webhook
misscall Data misscall webhook
device_id Data device_id webhook
created_at Data created_at webhook
updated_at Data updated_at webhook
id Data id webhook

Get Data

Sample PHP Script for Listening data:

$json = file_get_contents('php://input');
$data = json_decode($json);

file_put_contents("listen.txt", print_r($data,1));

Format data from webhook:

stdClass Object
(
    [event] => message
    [name] => woowa
    [data] => stdClass Object
        (
            [msg_id] => 3EB0B2C3DBC4C8442E48
            [device_id] => 1
            [name] => Admin
            [number] => 628975835238 
            [from_me] =>
            [from_group] =>
            [from_story] =>
            [chat_id] => d5dbb1fd-f67c-46a1-8e69-a499095acf03
            [user_id] =>
            [status] => DELIVERED
            [type] => text
            [timestamp] => 2021-06-23T03:18:44+00:00
            [message] => o
            [created_at] => 2021-06-23 03:18:45
            [updated_at] => 2021-06-23 03:18:45
            [id] => 225d29b7-d126-4d7d-98c0-75a0763d665d
            [quoted] =>
            [chat] => stdClass Object
                (
                    [user_id] =>
                )

        )

)

This endpoint is used to get data webhook.

Generate QR

Sample script

$device_key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx';

$url = 'https://multics.woo-wa.com/api/srv1/generate-qr';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$device_key
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "qr": "data:image/png;base64, ....
    }
}

This endpoint is used to generate QR Code.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/generate-qr

HTTP Headers

Parameter Description
device-key Device Key

Response

Parameter Description
status Status code
message Message status
data Data body
qr Qr code image encoded with base64

Device Info

Sample script

$license = '601bca1gth80';

$url = 'https://multics.woo-wa.com/api/srv1/device-info';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'license: '.$license
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "key": "1a2fe02f-6f95-4e1d-9f4d-f8bb193xxxx",
        "name": "woowa",
        "phone": "628515740xxxx"
    }
}

This endpoint is used to get device info.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/device-info

HTTP Headers

Parameter Description
license License Key

Response

Parameter Description
status Status code
message Message status
data Data body
key Device Key
name Device Label
phone Device Number

Device Status

Sample script

$key = db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx;

$url = 'https://multics.woo-wa.com/api/srv1/device-status';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$key
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "status": "PAIRED"
    }
}

This endpoint is used to get device status.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/device-status

HTTP Headers

Parameter Description
device-key Device Key

Response

Parameter Description
status Status code
message Message status
data Data body
status Status Device in Server

Device Logout

Sample script

$key = db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx;

$url = 'https://multics.woo-wa.com/api/srv1/device-logout';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$key
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "216",
        "key": "1a2fe02f-6f95-4e1d-9f4d-f8bb193xxxx",
        "name": "woowa name",
        "phone": "628515740xxxx",
        "status": "PAIRED",
        "qr_code": "data:image/png;base64,i.....",
        "wa_name": "Ibnu Mardini",
        "wa_version": "2.21.21.17",
        "manufacture": "Xiaomi",
        "os_version": "11",
        "battery": null,
        "license": "602dc3754xxxx",
        "created_at": "2021-10-06 06:28:21",
        "auto_send": false,
        "partner_id": "1",
        "merge_inbox": null,
        "notification": true
    }
}

This endpoint is used to logout from multics server.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/device-logout

HTTP Headers

Parameter Description
device-key Device Key

Response

Parameter Description
status Status code
message Message status
data Device Data

Use Here

Sample script

$key = db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx;

$url = 'https://multics.woo-wa.com/api/srv1/relogin';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'device-key: '.$key
));

echo $res = curl_exec($ch);

Response:

{
    "status": 200,
    "message": "Success!",
    "data": {
        "id": "216",
        "key": "1a2fe02f-6f95-4e1d-9f4d-f8bb193xxxx",
        "name": "woowa name",
        "phone": "628515740xxxx",
        "status": "PAIRED",
        "qr_code": "data:image/png;base64,i.....",
        "wa_name": "Ibnu Mardini",
        "wa_version": "2.21.21.17",
        "manufacture": "Xiaomi",
        "os_version": "11",
        "battery": null,
        "license": "602dc3754xxxx",
        "created_at": "2021-10-06 06:28:21",
        "auto_send": false,
        "partner_id": "1",
        "merge_inbox": null,
        "notification": true
    }
}

This endpoint is used to relogin in multics server, when you login in another web.whatsapp.

HTTP Request

GET https://multics.woo-wa.com/api/srv1/relogin

HTTP Headers

Parameter Description
device-key Device Key

Response

Parameter Description
status Status code
message Message status
data Device Data

Woowandroid (Whatsapp in Smartphone)

Send Message

Sample Script

Get player id from Woowandroid App CS ID menu in here

$param = array(
    'app_id' => '429d3472-da0f-4b2b-a63e-4644050caf8f', //app id don't change
    'include_player_ids' => ['20fe93ea-6bf4-428c-87e5-f7aa6xxxxx'], //you can take Player id from Woowandroid App CS ID menu.
    'data' => array(
        "type"      => 'Reminder', //opsional Reminder/After Checkout/Pending Payment/dll editable
        "message"   => 'Bismillah Demo woowandroid',
        "no_wa"     => '628975835238'
    ),
    'contents'  => array(
        "en"    => 'Woowa Title'
    ),
    "headings"  =>  array(
        "en"    => 'Woowa Notice'
    )
);
$data_json = json_encode($param);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://onesignal.com/api/v1/notifications');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json; charset=utf-8',
    'Authorization: Basic NjY0NzE3MTYtMzc3ZC00YmY5LWJhNzQtOGRiMWM1ZTNhNzBh')); //os_auth don't change
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Response:

{
  "id": "1b789027-41ce-4256-a3e9-d2115e5d100a",
  "recipients": "1",
  "external_id": "null",
}

This endpoint is used to send message.

HTTP Request

POST https://onesignal.com/api/v1/notifications

Header Parameters

Parameter Description
Authorization Basic NjY0NzE3MTYtMzc3ZC00YmY5LWJhNzQtOGRiMWM1ZTNhNzBh
Content-type application/json

Body Parameters

Parameter Description
app_id Aplication ID.
include_player_ids CS ID or Device ID
data[type] message type. Optional
data[message] text message
data[no_wa] destination WA number
contents[en] Notification Content
headings[en] Notification Title

Response

JSON Attribute Description
id 1b789027-41ce-4256-a3e9-d2115e5d100a
recipients 1
external_id null

Sync CS ID

Sample Script

$license = '5ca5a4e48dxxx';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://api.woo-wa.com/v2.0/woowandroid/get-cs-id-all/'.$license);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Response:

{
  "status": "found",
  "message": "data found",
  "data": 
    [ 
     { 
      "id":74,
      "cs_nama":"089634518xxx",
      "player_id":"8d3a7e7f-88d2-4fc3-91ed-1bb4aa4a6733",
      "device_id":"75b8f60fbdf79049",
      "created_at":"2019-07-30"
     } 
    ] 
}

This endpoint is used to send message.

HTTP Request

POST http://api.woo-wa.com/v2.0/woowandroid/get-cs-id-all/{license}

Parameters

Parameter Description
license License from woo-wa.com

Integromat Send

Sample Input Data to Add In Integromat

Get player id from Woowandroid App CS ID menu in here


 URL : https://onesignal.com/api/v1/notifications
 Method : POST
 Headers : none (empty)
 Query String : none (empty)
 Body Type : Raw
 Content Type : JSON (application/json)
 Request Content : {"app_id":"429d3472-da0f-4b2b-a63e-4644050caf8f","_player_ids":["20fe93ea-6bf4-428c-87e5-f7aa6xxxxx"],"data":{"type":"Reminder","message":"Bismillah Demo woowandroid","no_wa":"628975835238"},"contents":{"en":"Woowa Title"},"headings":{"en":"Woowa Notice"}}

Response:

{
  "id": "1b789027-41ce-4256-a3e9-d2115e5d100a",
  "recipients": "1",
  "external_id": "null",
}

This endpoint is used to send message.

HTTP Request

POST https://onesignal.com/api/v1/notifications

Header Parameters

Parameter Description
Authorization Basic NjY0NzE3MTYtMzc3ZC00YmY5LWJhNzQtOGRiMWM1ZTNhNzBh
Content-type application/json

Body Parameters

Parameter Description
app_id Aplication ID.
include_player_ids CS ID or Device ID
data[type] message type. Optional
data[message] text message
data[no_wa] destination WA number
contents[en] Notification Content
headings[en] Notification Title

Response

JSON Attribute Description
id 1b789027-41ce-4256-a3e9-d2115e5d100a
recipients 1
external_id null

Woowandroid v2 (Whatsapp in Smartphone)

Send Message

Sample Script

Get player id from Woowandroid App CS ID menu in here

$param = array(
    "to" => "eJFkzLWnSaWLuxbbsrBfaK:APA91bF1-eVk-kzg1g1Lsxxxxx",
    "data" => array(
        "message"   => "Bismillah Demo & # * woowandroid",
        "schedule"  => "2020-05-13 11:21:15", // opsional
        "number"    => "085704701230",
        "whatsapp"  => "personal" // bisnis, auto
    )
);
$data_json=json_encode($param, 1);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send');
curl_setopt( $ch,CURLOPT_POST, true );
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch,CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Authorization: Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4')); //woowandroid
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Response:

{
  "multicast_id":7864996124893606395,
  "success":1,
  "failure":0,
  "canonical_ids":0,
  "results":[
    {
      "message_id":"0:1598587396350190%d2b0a9c8f9fd7ecd"
    }
  ]
}

This endpoint is used to send message.

HTTP Request

POST https://fcm.googleapis.com/fcm/send

Header Parameters

Parameter Description
Authorization Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4
Content-type application/json

Body Parameters

Parameter Description
to CS ID or Device ID
data[message] text message
data[schedule] schedule send message (optional)
data[number] destination WA number
data[whatsapp] whatsapp type

Response

JSON Attribute Description
multicast_id 7864996124893606395
success 1
failure 0
canonical_ids 0
results[0][message_id] 0:1598587396350190%d2b0a9c8f9fd7ecd

Send Image

Sample Script

Get player id from Woowandroid App CS ID menu in here

$param = array(
    'data' => array(
        "message" => 'JFaidah Fikih dari grup Multaqo Indonesia & $ \' ///"(MDI) [email protected]#$%^&*())_+|;',
        "number" => '628139307xxxx',
        "img_url" => "https://cdn.idntimes.com/content-images/community/2019/04/palm-phone-review-20-840x472-db1fdef88146e78ce783e925c839e2c3_600x400.jpg",
        "send_from" => "Woowa X2R",
        // "schedule" => '2021-02-24 23:20:00'
    ),
    'to' => "dCr82l7KRNurTPL_mSvj3P:APA91bElx4jqgJuQta2YBNzeQ3rgVJ3_-NJfAPGATWHec1-6NFlAQPB4Ur1LbO-VRLe41p87uIQ6utyqvqE6wO1v_5q1N8ObjwJwDWJ2hGC3DYd9j9JcHhQfzxxxx", // change with your cs id
);
$data_json = json_encode($param);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Authorization: Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4')); //os_auth don't change
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Response:

{
    "multicast_id": 6953388008310302546,
    "success": 1,
    "failure": 0,
    "canonical_ids": 0,
    "results": [{
        "message_id": "0:1616385264214406%7947997ef9fd7ecd"
    }]
}

This endpoint is used to send image.

HTTP Request

POST https://fcm.googleapis.com/fcm/send

Header Parameters

Parameter Description
Authorization Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4
Content-type application/json

Body Parameters

Parameter Description
to CS ID or Device ID
data[message] text message, for image captions
data[schedule] schedule send message (optional)
data[img_url] full url path your image
data[send_from] for info, where the message was sent from
data[number] destination WA number

Response

JSON Attribute Description
multicast_id 7864996124893606395
success 1
failure 0
canonical_ids 0
results[0][message_id] 0:1598587396350190%d2b0a9c8f9fd7ecd

Send File

Sample Script

Get player id from Woowandroid App CS ID menu in here

$param = array(
    'data' => array(
        "number" => '628139307xxxx',
        "file_url" => "https://ngl.cengage.com/assets/downloads/grex_pro0000000538/grex1_su3.pdf",
        "send_from" => "Woowa X2R",
        // "schedule" => '2021-02-24 23:20:00'
    ),
    'to' => "dCr82l7KRNurTPL_mSvj3P:APA91bElx4jqgJuQta2YBNzeQ3rgVJ3_-NJfAPGATWHec1-6NFlAQPB4Ur1LbO-xxxxx",
);
$data_json = json_encode($param);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Authorization: Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4')); //os_auth don't change
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Response:

{
    "multicast_id": 6953388008310302546,
    "success": 1,
    "failure": 0,
    "canonical_ids": 0,
    "results": [{
        "message_id": "0:1616385264214406%7947997ef9fd7ecd"
    }]
}

This endpoint is used to send file.

HTTP Request

POST https://fcm.googleapis.com/fcm/send

Header Parameters

Parameter Description
Authorization Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4
Content-type application/json

Body Parameters

Parameter Description
to CS ID or Device ID
data[schedule] schedule send message (optional)
data[file_url] full url path to your file
data[send_from] for info, where the message was sent from
data[number] destination WA number

Response

JSON Attribute Description
multicast_id 7864996124893606395
success 1
failure 0
canonical_ids 0
results[0][message_id] 0:1598587396350190%d2b0a9c8f9fd7ecd

Google Form

Google Form Integrate Woowa Eco

Copy this script to google script editor

Get key from http://woo-wa.com here

function sendMessageWoowaeco() {
    //editable
    var kolom_no_wa=3; //kolom ke
    var woowa_eco_key='db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key
    var template="halo pesan anda : [kolom2] dan no anda : [kolom3]"; // use \n , if you want to enter on your message

    // do not edit
    algo(kolom_no_wa,woowa_eco_key,template);
  }

  // do not edit
  function algo(kolom_no_wa,woowa_eco_key,template){
    var _0x48d7=['post','fetch','log','getActiveSheet','getRange','getLastRow','getLastColumn','getValues','length','split','[kolom','join','http://116.203.191.58/api/async_send_message','application/json'];(function(_0xc35321,_0x538ee9){var _0x4bf9f3=function(_0x3f3f6e){while(--_0x3f3f6e){_0xc35321['push'](_0xc35321['shift']());}};_0x4bf9f3(++_0x538ee9);}(_0x48d7,0x1a7));var _0xb32f=function(_0xc35321,_0x538ee9){_0xc35321=_0xc35321-0x0;var _0x4bf9f3=_0x48d7[_0xc35321];return _0x4bf9f3;};var ss=SpreadsheetApp[_0xb32f('0x0')]();var rows=ss[_0xb32f('0x1')](0x2,0x2,ss[_0xb32f('0x2')](),ss[_0xb32f('0x3')]())[_0xb32f('0x4')]();var i=rows[_0xb32f('0x5')]-0x2;for(var k=0x0;k<=ss[_0xb32f('0x3')]();k++){var template=template[_0xb32f('0x6')](_0xb32f('0x7')+(k+0x2)+']')[_0xb32f('0x8')](rows[i][k]);}var url=_0xb32f('0x9');var data={'phone_no':rows[i][kolom_no_wa-0x2],'key':woowa_eco_key,'message':template};var payload=JSON['stringify'](data);var length=payload[_0xb32f('0x5')]['toString']();var headers={'Content-Type':_0xb32f('0xa')};var options={'method':_0xb32f('0xb'),'payload':payload,'headers':headers,'contentLength':length,'muteHttpExceptions':!![]};Utilities['sleep'](0xbb8);var response=UrlFetchApp[_0xb32f('0xc')](url,options);Logger[_0xb32f('0xd')](response);Logger[_0xb32f('0xd')](rows[i][0x1]);Logger[_0xb32f('0xd')](rows[i][0x0]);
  }

This endpoint is used to send message.

Script parameter

Parameter Description
kolom_no_wa column number or Whatsapp number from left (in spreadsheet)
woowa_eco_key key from woo-wa.com e.g f3c14e82574ff675a523c27159fa7696207a3b0e6ea28xxx
template template of massage e.g Hi [kolom2] your whatsapp number is [kolom3]

shortcode parameter in template

Parameter Description
[kolom1] its always timestamp
[kolom2] opsional. up to order in google form
[kolom3] opsional. up to order in google form
[kolom4] opsional. up to order in google form
[kolom5] opsional. up to order in google form
[kolomxx] opsional. up to order in google form. xx mean etc for next column

Response

[20-01-12 19:38:51:267 PST] 15788867297075
[20-01-12 19:38:51:268 PST] +628228054xxxx
[20-01-12 19:38:51:268 PST] test

Google Form Integrate Woowandroid

Copy this script to google script editor

Get include_player_ids from Woowandroid App CS ID menu in here

function sendMessageWoowandroid() {

    var kolom_no_wa=3; //kolom ke
    var include_player_ids="8f07d3d8-e730-48eb-a811-8cc4ba53d47c";
    var template="halo pesan anda : [kolom2] dan no anda : [kolom3]"; // use \n , if you want to enter on your message

    // do not edit
    algo(kolom_no_wa,include_player_ids,template)
}

// do not edit
function algo(kolom_no_wa,include_player_ids,template){
    var _0x4dfd=['Reminder','Woowa\x20Notice','stringify','application/json','post','fetch','getActiveSheet','getRange','getLastColumn','getValues','length','split','[kolom','join','https://onesignal.com/api/v1/notifications','429d3472-da0f-4b2b-a63e-4644050caf8f'];(function(_0x5523ec,_0x1c1138){var _0x44abf2=function(_0x4e59a6){while(--_0x4e59a6){_0x5523ec['push'](_0x5523ec['shift']());}};_0x44abf2(++_0x1c1138);}(_0x4dfd,0x136));var _0x338b=function(_0x5523ec,_0x1c1138){_0x5523ec=_0x5523ec-0x0;var _0x44abf2=_0x4dfd[_0x5523ec];return _0x44abf2;};var ss=SpreadsheetApp[_0x338b('0x0')]();var rows=ss[_0x338b('0x1')](0x2,0x2,ss['getLastRow'](),ss[_0x338b('0x2')]())[_0x338b('0x3')]();var i=rows[_0x338b('0x4')]-0x2;for(var k=0x0;k<=ss[_0x338b('0x2')]();k++){var template=template[_0x338b('0x5')](_0x338b('0x6')+(k+0x2)+']')[_0x338b('0x7')](rows[i][k]);}var url=_0x338b('0x8');var data={'app_id':_0x338b('0x9'),'include_player_ids':[include_player_ids],'data':{'type':_0x338b('0xa'),'message':template,'no_wa':rows[i][kolom_no_wa-0x2]},'contents':{'en':'Woowa\x20Title'},'headings':{'en':_0x338b('0xb')}};var payload=JSON[_0x338b('0xc')](data);var headers={'Content-Type':_0x338b('0xd'),'Authorization':'Basic\x20NjY0NzE3MTYtMzc3ZC00YmY5LWJhNzQtOGRiMWM1ZTNhNzBh'};var options={'method':_0x338b('0xe'),'payload':payload,'headers':headers,'muteHttpExceptions':!![]};Utilities['sleep'](0xbb8);var response=UrlFetchApp[_0x338b('0xf')](url,options);Logger['log'](response);
}

This endpoint is used to send message.

Script parameter

Parameter Description
kolom_no_wa column number or Whatsapp number from left (in spreadsheet)
include_player_ids key from woo-wa.com e.g 8f07d3d8-e730-48eb-a811-8cc4ba53dxxx
template template of massage e.g Hi [kolom2] your whatsapp number is [kolom3]

shortcode parameter in template

Parameter Description
[kolom1] its always timestamp
[kolom2] opsional. up to order in google form
[kolom3] opsional. up to order in google form
[kolom4] opsional. up to order in google form
[kolom5] opsional. up to order in google form
[kolomxx] opsional. up to order in google form. xx mean etc for next column

Response

[20-01-13 10:37:23:417 ICT] {"id":"5406ee3b-f4de-4c00-8376-35de65c82164","recipients":1,"external_id":null}

Google Form Integrate Woowandroid V2

Copy this script to google script editor

Get include_player_ids from Woowandroid App CS ID menu in here

function sendMessageWoowa(e) {
    //editable
    var kolom_no_wa = 2; //kolom ke
    var key = 'db63f5inihanyakeydummycf083dd3ffd025d672e255xxxxx'; //this is demo key please change with your own key/cs_id/device_id
    var template = "halo pesan anda : [kolom3] dan no anda : [kolom2]"; // use \n , if you want to enter on your message
    var type = 'woowandroidv2' // value (woowaeco/woowandroidv1/woowandroidv2/woowacrm)

    // do not edit
    algo(kolom_no_wa, key, template, type, e);
}

// do not edit
function algo(kolom_no_wa, key, template, type, e) {
    var _0x48d7 = ['post', 'fetch', 'log', 'getActiveSheet', 'getRange', 'getLastRow', 'getLastColumn', 'getValues', 'length', 'split', '[kolom', 'join', 'http://116.203.191.58/api/async_send_message', 'application/json']; (function(_0xc35321, _0x538ee9) { var _0x4bf9f3 = function(_0x3f3f6e) { while (--_0x3f3f6e) { _0xc35321['push'](_0xc35321['shift']()); } }; _0x4bf9f3(++_0x538ee9); }(_0x48d7, 0x1a7)); var _0xb32f = function(_0xc35321, _0x538ee9) { _0xc35321 = _0xc35321 - 0x0; var _0x4bf9f3 = _0x48d7[_0xc35321]; return _0x4bf9f3; }; var ss = SpreadsheetApp[_0xb32f('0x0')](); var rows = ss[_0xb32f('0x1')](0x2, 0x2, ss[_0xb32f('0x2')](), ss[_0xb32f('0x3')]())[_0xb32f('0x4')](); try { var range = e.range; var i = range.getRow() - 0x2; } catch(err) { Logger.log('Invalid range please use event type (On edit/On form submit);'); Logger.log(err); return; } for (var k = 0x0; k <= ss[_0xb32f('0x3')](); k++) { var template = template[_0xb32f('0x6')](_0xb32f('0x7') + (k + 0x2) + ']')[_0xb32f('0x8')](rows[i][k]); } var no_wa = rows[i][kolom_no_wa - 0x2].toString(); if (typeof no_wa === "string") { if (no_wa.length>0) { var no_wa = no_wa.split(/[^0-9]/).join(""); no_wa = no_wa.replace(/^[0]/, "62"); no_wa = "+" + no_wa; no_wa = no_wa.length > 5 ? no_wa : ''; } } switch (type) { case "woowaeco": var param = { "phone_no": no_wa, "message": template, "key": key, }; var url = "http://116.203.92.59/api/async_send_message" , payload = JSON.stringify(param) , headers = { "contentType": "application/json" } , options = { 'method': 'post', 'payload': payload, 'headers': headers, 'contentType': 'application/json', 'muteHttpExceptions': true }; var response = UrlFetchApp[_0xb32f('0xc')](url, options); var result = response.getContentText(); Logger.log(options); Logger.log(result); break; case "woowacrm": var url = 'https://crm.woo-wa.com/send/message-text'; var data = { "deviceId": key, "number": no_wa, "message": template }; var headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Cache-Control': 'no-cache' }; var options = { 'method': 'post', 'payload': data, 'headers': headers, 'muteHttpExceptions': !![] }; var response = UrlFetchApp[_0xb32f('0xc')](url, options); var result = response.getContentText(); Logger.log(result); break; case "woowandroidv1": var param = { 'type': 'Reminder', 'message': template, 'no_wa': no_wa }; var url = 'https://onesignal.com/api/v1/notifications'; var data = { 'app_id': '429d3472-da0f-4b2b-a63e-4644050caf8f', 'include_player_ids': [key], 'data': param, 'contents': { 'en': 'Woowa Title' }, 'headings': { 'en': 'Woowa Title' } }; var payload = JSON.stringify(data); var headers = { 'Content-Type': 'application/json', 'Authorization': 'Basic NjY0NzE3MTYtMzc3ZC00YmY5LWJhNzQtOGRiMWM1ZTNhNzBh' }; var options = { 'method': 'post', 'payload': payload, 'headers': headers, 'muteHttpExceptions': !![] }; var response = UrlFetchApp[_0xb32f('0xc')](url, options); var result = response.getContentText(); Logger.log(options); Logger.log(result); break; case "woowandroidv2": var url = 'https://fcm.googleapis.com/fcm/send'; var data = { "to": key, "data": { "number": no_wa, "message": template } }; var payload = JSON.stringify(data); var headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4' }; var options = { 'method': 'post', 'payload': payload, 'headers': headers, 'muteHttpExceptions': !![] }; var response = UrlFetchApp[_0xb32f('0xc')](url, options); var result = response.getContentText(); Logger.log(options); Logger.log(result); break; default: Logger.log('Error: type value is ' + type); break; } Utilities['sleep'](0xbb8); Logger[_0xb32f('0xd')](response); Logger[_0xb32f('0xd')](rows[i][0x1]); Logger[_0xb32f('0xd')](rows[i][0x0]);
}

This endpoint is used to send message. use trigger event On edit/On form submit

Script parameter

Parameter Description
kolom_no_wa column number or Whatsapp number from left (in spreadsheet)
key use (woowakey/cs_id/device_id)
template template of massage e.g Hi [kolom2] your whatsapp number is [kolom3]
type type integrate (woowaeco/woowandroidv1/woowandroidv2/woowacrm)

shortcode parameter in template

Parameter Description
[kolom1] its always timestamp
[kolom2] opsional. up to order in google form
[kolom3] opsional. up to order in google form
[kolom4] opsional. up to order in google form
[kolom5] opsional. up to order in google form
[kolomxx] opsional. up to order in google form. xx mean etc for next column

Response

[20-01-13 10:37:23:417 ICT] {"id":"5406ee3b-f4de-4c00-8376-35de65c82164","recipients":1,"external_id":null}

Google Form Integrate Woowa Addon

Copy this script to google form add-on script editor.

/*! Woowa Addon v2.4.915 | (c) Woowa | mhgufron | https://app.woo-wa.com/terms-conditions | https://app.woo-wa.com/privacy-policy */
var ADDON_TITLE = 'Woowa'; var ADDON_VERSION = 'v2.4.915'; function onOpen(e) { FormApp.getUi() .createAddonMenu() .addItem("Woowa Settings", "showSidebar") .addItem('About', 'showAbout') .addToUi(); } function onInstall(e) { onOpen(e); } function setTrigger() { adjustFormSubmitTrigger(); var text = 'Trigger is ready, please refresh the page to get started'; var ui = HtmlService.createHtmlOutput(text) .setWidth(420) .setHeight(270); FormApp.getUi().showModalDialog(ui, 'Set Trigger'); } function unsetTrigger() { deleteSubmitTrigger(); var text = 'Trigger is unset, please refresh the page to finish the process'; var ui = HtmlService.createHtmlOutput(text) .setWidth(420) .setHeight(270); FormApp.getUi().showModalDialog(ui, 'Unset Trigger'); } function cekTrigger() { var form = FormApp.getActiveForm(); allTriggers = ScriptApp.getUserTriggers(form); for (var i = 0; i < allTriggers.length; i++) { if (allTriggers[i].getEventType() == ScriptApp.EventType.ON_FORM_SUBMIT) { return true; } else { return false; } } } function deleteSubmitTrigger() { var allTriggers = ScriptApp.getProjectTriggers(); var form = FormApp.getActiveForm(); allTriggers = ScriptApp.getUserTriggers(form); for (var i = 0; i < allTriggers.length; i++) { ScriptApp.deleteTrigger(allTriggers[i]); Logger.log(allTriggers[i]); } } function showSidebar(e) { var btnTriggers = ''; if (cekTrigger()) { btnTriggers = '<span style="color:green"> Trigger is already set</span>'; } else { btnTriggers = `<button class="create" id="setTriggers" onclick="setTrigger()">Set Trigger</button>`; } var ui = HtmlService.createTemplate(`<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- <div class="sidebar"> --> <!-- Tab links --> <div class="tab"> <button class="tablinks active" onclick="openTab(event, 'Settings')">Settings</button> <button class="tablinks" onclick="openTab(event, 'Client')">Client</button> <button class="tablinks" onclick="openTab(event, 'Admin')">Admin</button> </div> <!-- Tab content --> <div id="Settings" class="tabcontent" style="display: block;"> <div class="block form-group"> <label for="integrasi">Type <span style="color: red;">*</span></label> <select id="integrasi"> <option value=''>-- Select --</option> <option value='woowamultics'>Woowa Multics</option> <option value='woowacrmv2'>Woowa Crm (Chrome Extension)</option> <option value='woowaeco'>Woowa Eco</option> <option value='woowandroidv1'>Woowandroid v1</option> <option value='woowandroidv2'>Woowandroid v2</option> </select> </div> <div class="form-group"> <label for="key">Token <span style="color: red;">*</span></label> <input type="text" id="key" name="key" placeholder="Ex: db63f52c1a00d33cf143524083dd3xxx.."> </div> <div class="form-group" id="button-bar" style="margin: 15px 0 5px;"> <button class="action" id="save">Save</button> `+btnTriggers+` </div> </div> <div id="Client" class="tabcontent"> <div class="clientNotifyForm"> <input type="checkbox" id="clientNotify"> <label for="clientNotify">Send wa to client?</label> </div> <div id="clientOptions"> <div class="form-group"> <label for="no_wa">No Wa</label> <select id="no_wa"> <option value=''>-- Select --</option> </select> </div> <div class="form-group"> <label for="template">Template</label> <textarea name="template" id="template" rows="7" placeholder="Ex: hi, [Name] and your number : [No Wa]..."></textarea> </div> </div> <div class="form-group" id="client-button-bar" style="margin: 15px 0 5px;"> <button class="action" id="clientSave">Save</button> </div> </div> <div id="Admin" class="tabcontent"> <div class="adminNotifyForm"> <input type="checkbox" id="adminNotify"> <label for="adminNotify">Send wa to admin?</label> </div> <div id="adminOptions"> <div class="form-group"> <label for="noWaAdmin">No Wa</label> <input type="text" id="noWaAdmin" placeholder="Ex: 628xxx,628xxx"> </div> <div class="form-group"> <label for="templateAdmin">Template</label> <textarea name="templateAdmin" id="templateAdmin" rows="7" placeholder="Ex: hi, [Name] and your number : [No Wa]..."></textarea> </div> </div> <div class="form-group" id="admin-button-bar" style="margin: 15px 0 5px;"> <button class="action" id="adminSave">Save</button> </div> </div> <!-- </div> --> <div class="sidebar bottom"> <a href="https://woo-wa.com"> <img alt="Add-on logo" class="logo" width="30" style="margin-bottom: -0.7em;" src="https://woo-wa.com/wp-content/uploads/2019/05/Logo-Woo-WA-PNG-Berwarna-150px.png"> </a> <span class="gray branding-text">Form Notifications by <a href="https://woo-wa.com">Woowa</a> `+ADDON_VERSION+`</span> </div> <link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <style> .form-group input, .form-group textarea, .form-group select { width: 100%; padding: 8px; margin: 3px 0 8px; } .success { color: rgb(5, 185, 11); } .tab { overflow: hidden; border: 1px solid #ccc; background-color: #f1f1f1; } .tab button { background-color: inherit; float: left; border: none; outline: none; cursor: pointer; padding: 14px 16px; transition: 0.3s; } .tab button:hover { background-color: #ddd; } .tab button.active { background: #ccc; box-shadow: none; } .tabcontent { display: none; padding: 6px 12px; border-top: none; } .tabcontent { animation: fadeEffect 1s; } .tablinks { height: 38px !important; padding: 4px !important; margin: 0 !important; border-radius: 0 !important; border: 0 !important; } @keyframes fadeEffect { from {opacity: 0;} to {opacity: 1;} } .adminNotifyForm, .clientNotifyForm { margin-bottom: 8px; } #adminOptions, #clientOptions { display: none; } </style> <script> $(function () { $('#Settings').click(); $('#save, #adminSave, #clientSave').on('click', saveSettingToServer); $('input, select, textarea').on('click', removeStatus); getData(); changeLabel(); }); $("#integrasi").on("change", function() { changeLabel(); }); $('#adminNotify').click(toggleadminNotify); $('#clientNotify').click(toggleclientNotify); function openTab(evt, cityName) { var i, tabcontent, tablinks; tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } tablinks = document.getElementsByClassName("tablinks"); for (i = 0; i < tablinks.length; i++) { tablinks[i].className = tablinks[i].className.replace(" active", ""); } document.getElementById(cityName).style.display = "block"; evt.currentTarget.className += " active"; } function getData() { google.script.run.withSuccessHandler(loadSettings) .withFailureHandler(showStatus) .withUserObject($('#button-bar').get()) .getSettings(); } function loadSettings(settings) { $('#integrasi').val(settings.integrasi); $('#key').val(settings.key); $('#template').text(settings.template); $('#noWaAdmin').val(settings.noWaAdmin); $('#templateAdmin').text(settings.templateAdmin); if (settings.adminNotify === 'true') { $('#adminNotify').prop('checked', true); $('#adminOptions').show(); } if (settings.clientNotify === 'true') { $('#clientNotify').prop('checked', true); $('#clientOptions').show(); } for (var i = 0; i < settings.allItems.length; i++) { var option = $('<option>').attr('value', settings.allItems[i]['id']) .text(settings.allItems[i]['title']); $('#no_wa').append(option); } $('#no_wa').val(settings.no_wa); changeLabel(); } function saveSettingToServer() { this.disabled = true; $('.status').remove(); var integrasi= $('#integrasi').val(), key= $('#key').val(), no_wa= $('#no_wa').val(), template= $('#template').val(), adminNotify =$('#adminNotify').is(':checked')? 'true': 'false', clientNotify =$('#clientNotify').is(':checked')? 'true': 'false', noWaAdmin= $('#noWaAdmin').val(), templateAdmin= $('#templateAdmin').val(), settings = { 'integrasi': integrasi, 'key': key, 'no_wa': no_wa, 'template': template, 'adminNotify': adminNotify, 'clientNotify': clientNotify, 'noWaAdmin': noWaAdmin, 'templateAdmin': templateAdmin }; if (key=='' || integrasi=='') { showStatus('Please input valid data', $('#button-bar')); return; } google.script.run .withSuccessHandler( function(msg, element) { showStatus('Saved settings', $('#button-bar'), 'success'); showStatus('Saved settings', $('#admin-button-bar'), 'success'); showStatus('Saved settings', $('#client-button-bar'), 'success'); element.disabled = false; }) .withFailureHandler( function(msg, element) { showStatus(msg, $('#button-bar'), 'error'); showStatus(msg, $('#admin-button-bar'), 'error'); showStatus(msg, $('#client-button-bar'), 'error'); element.disabled = false; }) .withUserObject(this) .saveSettings(settings); } function showStatus(msg, element, cls='error') { var div = $('<div>') .attr('class', 'status '+cls) .text(msg); $(element).after(div); } function removeStatus() { $('#save').removeAttr('disabled'); $('#adminSave').removeAttr('disabled'); $('#clientSave').removeAttr('disabled'); $('.status').remove(); } function changeLabel() { $("label[for=key]").html('Token <span style="color: red;">*</span>'); console.log($("#integrasi").val()); var labelArr = {"woowacrmv2": "DeviceID", "woowaeco": "Key", "woowandroidv1": "CS ID", "woowandroidv2": "CS ID", "woowamultics": "Device Key"}; var label = $("#integrasi").val() == ''?'Token':labelArr[$("#integrasi").val()]; $("label[for=key]").html(label+' <span style="color: red;">*</span>'); } function toggleadminNotify() { $('.status').remove(); if($('#adminNotify').is(':checked')) { $('#adminOptions').show(); } else { $('#adminOptions').hide(); } } function toggleclientNotify() { $('.status').remove(); if($('#clientNotify').is(':checked')) { $('#clientOptions').show(); } else { $('#clientOptions').hide(); } } function setTrigger() { this.disabled = true; $('#status').remove(); google.script.run .withSuccessHandler( function(msg, element) { showStatus('Saved settings', $('#button-bar'), 'success'); element.disabled = false; }) .withFailureHandler( function(msg, element) { showStatus(msg, $('#button-bar'), 'error'); element.disabled = false; }) .withUserObject(this) .setTrigger(); } </script>`) .evaluate() .setTitle("Woowa Settings"); FormApp.getUi().showSidebar(ui); } function showAbout() { var ui = HtmlService.createHtmlOutput('plugin integrasi woowa dan google form') .setWidth(420) .setHeight(270); FormApp.getUi().showModalDialog(ui, 'About Woowa'); } function saveSettings(settings) { PropertiesService.getDocumentProperties().setProperties(settings); } function getSettings() { var settings = PropertiesService.getDocumentProperties().getProperties(); if (!settings.creatorEmail) { settings.creatorEmail = Session.getEffectiveUser().getEmail(); } var form = FormApp.getActiveForm(); var TEXT = form.getItems(FormApp.ItemType.TEXT); var PARAGRAPH_TEXT = form.getItems(FormApp.ItemType.PARAGRAPH_TEXT); var CHECKBOX = form.getItems(FormApp.ItemType.CHECKBOX); var MULTIPLE_CHOICE = form.getItems(FormApp.ItemType.MULTIPLE_CHOICE); var LIST = form.getItems(FormApp.ItemType.LIST); var SCALE = form.getItems(FormApp.ItemType.SCALE); var GRID = form.getItems(FormApp.ItemType.GRID); var CHECKBOX_GRID = form.getItems(FormApp.ItemType.CHECKBOX_GRID); var allItems = TEXT.concat(PARAGRAPH_TEXT,CHECKBOX,CHECKBOX_GRID,GRID,MULTIPLE_CHOICE,LIST,SCALE); Logger.log(allItems); settings.allItems = []; for (var i = 0; i < allItems.length; i++) { settings.allItems.push({ title: allItems[i].getTitle(), id: allItems[i].getId() }); } return settings; } function adjustFormSubmitTrigger() { var form = FormApp.getActiveForm(); var triggers = ScriptApp.getUserTriggers(form); var triggerNeeded = 'true'; var existingTrigger = null; for (var i = 0; i < triggers.length; i++) { if (triggers[i].getEventType() == ScriptApp.EventType.ON_FORM_SUBMIT) { existingTrigger = triggers[i]; break; } } if (triggerNeeded && !existingTrigger) { var trigger = ScriptApp.newTrigger('respondToFormSubmit') .forForm(form) .onFormSubmit() .create(); } else if (!triggerNeeded && existingTrigger) { ScriptApp.deleteTrigger(existingTrigger); } } function respondToFormSubmit(e) { var authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL); if (authInfo.getAuthorizationStatus() == ScriptApp.AuthorizationStatus.REQUIRED) { sendReauthorizationRequest(); } else { sendRespondentNotification(e); } } function sendReauthorizationRequest() { var settings = PropertiesService.getDocumentProperties(); var authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL); var lastAuthEmailDate = settings.getProperty('lastAuthEmailDate'); var today = new Date().toDateString(); if (lastAuthEmailDate != today) { if (MailApp.getRemainingDailyQuota() > 0) { var template = HtmlService.createTemplate(`<p>The Google Form add-on <i><?= addonTitle ?></i> is set to run automatically whenever a form is submitted. The add-on was recently updated and it needs you to re-authorize it to run on your behalf.</p> <p>The add-on's automatic functions are temporarily disabled until you re-authorize it. To do so, open Google Form and run the add-on from the Add-ons menu. Alternatively, you can click this link to authorize it:</p> <p><a href="<?= url ?>">Re-authorize the add-on.</a></p> <p>This notification email will be sent to you at most once per day until the add-on is re-authorized.</p>`); template.url = authInfo.getAuthorizationUrl(); template.notice = NOTICE; var message = template.evaluate(); MailApp.sendEmail(Session.getEffectiveUser().getEmail(), 'Authorization Required', message.getContent(), { name: ADDON_TITLE, htmlBody: message.getContent() }); } settings.setProperty('lastAuthEmailDate', today); } } function sendToAdmin(msgAdmin) { var settings = PropertiesService.getDocumentProperties(); var adminNotifyProperty = settings.getProperty('adminNotify'); if (adminNotifyProperty === 'true') { var noWaAdminProperty = settings.getProperty('noWaAdmin'); var arrNowa = noWaAdminProperty.split(','); arrNowa.forEach(function (noWaAdmin, index) { var setting = getSettings(); noWaAdmin = validatePhone(noWaAdmin); switch (setting.integrasi) { case "woowaeco": woowaEcoSendWa(noWaAdmin,msgAdmin,setting.key); break; case "woowacrmv2": woowaCrmV2SendWa(noWaAdmin,msgAdmin,setting.key); break; case "woowandroidv1": woowaAndroidV1SendWa(noWaAdmin,msgAdmin,setting.key); break; case "woowandroidv2": woowaAndroidV2SendWa(noWaAdmin,msgAdmin,setting.key); break; case "woowamultics": woowaMulticsSendWa(noWaAdmin,msgAdmin,setting.key); break; default: Logger.log('Error: integrasi value is ' + setting.integrasi); break; } Utilities.sleep(7 * 1000); }); } else { Logger.log('false'); } return; } function getOutputTemplate(template) { var matches = [],find = [], replace = [], curMatch, rxp = /\[([^\]]+)\]/g; while( curMatch = rxp.exec( template ) ) { matches.push( curMatch[1] ); } if (matches) { matches.forEach(function (item, index) { var formData = objectifyForm(); if (formData[item]) { find.push('['+item+']'); replace.push(formData[item]); } var timestamp = new Date().toISOString().split('T').join(' ').slice(0,10); var date = new Date().toISOString().split('T').join(' ').slice(0,19); if (item=="Timestamp") { find.push('[Timestamp]'); replace.push(timestamp); } if (item=="timestamp") { find.push('[timestamp]'); replace.push(timestamp); } if (item=="Date") { find.push('[Date]'); replace.push(date); } if (item=="date") { find.push('[date]'); replace.push(date); } }); var output = template.replaceArray(find, replace); return output; } } function sendRespondentNotification(e) { var response = e.response; var form = FormApp.getActiveForm(); var settings = PropertiesService.getDocumentProperties(); var no_wa_property = settings.getProperty('no_wa'); var no_wa_item = form.getItemById(parseInt(no_wa_property)); var no_wa = response.getResponseForItem(no_wa_item).getResponse(); no_wa = validatePhone(no_wa); if (no_wa == "") { Logger.log("No Wa is empty"); return; } var setting = getSettings(); if (setting.integrasi) { var template = settings.getProperty('template'), templateAdmin = settings.getProperty('templateAdmin'); var msg = getOutputTemplate(template); var msgAdmin = getOutputTemplate(templateAdmin); var clientNotifyProperty = settings.getProperty('clientNotify'); if (clientNotifyProperty === 'true') { switch (setting.integrasi) { case "woowaeco": woowaEcoSendWa(no_wa,msg,setting.key); break; case "woowacrmv2": woowaCrmV2SendWa(no_wa,msg,setting.key); break; case "woowandroidv1": woowaAndroidV1SendWa(no_wa,msg,setting.key); break; case "woowandroidv2": woowaAndroidV2SendWa(no_wa,msg,setting.key); break; case "woowamultics": woowaMulticsSendWa(no_wa,msg,setting.key); break; default: Logger.log('Error: integrasi value is ' + setting.integrasi); break; } Utilities.sleep(7 * 1000); } sendToAdmin(msgAdmin); return; } } String.prototype.replaceArray = function(find, replace) { var replaceString = this; if (find.length>0 && replace.length>0) { for (var i = 0; i < find.length; i++) { replaceString = replaceString.replace(find[i], replace[i]); } } else { var output = ''; for (var i = 0; i < replaceString.length; i++) { output += replaceString[i]; } replaceString=output; } return replaceString; }; function objectifyForm() { var myform = FormApp.getActiveForm(); var formResponses = myform.getResponses(); var currentResponse = formResponses[formResponses.length-1]; var responseArray = currentResponse.getItemResponses(); var form = {}; form.user = currentResponse.getRespondentEmail(); form.timestamp = currentResponse.getTimestamp(); form.formName = myform.getTitle(); for (var i = 0; i < responseArray.length; i++){ var response = responseArray[i].getResponse(); var item = responseArray[i].getItem().getTitle(); form[item] = response; } return form; } function validatePhone(no_wa) { if (typeof no_wa == "string") { var no_wa = no_wa.split(/[^0-9]/).join(""); no_wa = no_wa.replace(/^[0]/, "62"); } else { no_wa = ""; } return no_wa; } function spinText(msg) { if(msg.indexOf("{") == 0) { Logger.log('1'); var get_spintext = msg.substring(0, msg.indexOf("}")); var explode_kurawal_buka = msg.split("{"); var explode_kurawal_tutup = explode_kurawal_buka[1].split("}"); var explode = explode_kurawal_tutup[0].split("|"); var spintext = explode[Math.floor(Math.random() * explode.length)]; msg = msg.replace(get_spintext, spintext); msg = msg.replace("}", "", spintext); msg = msg.replace("|", "", spintext); } if (msg.indexOf('{') > 0) { Logger.log('2'); var get_spintext = msg.substring(0, msg.indexOf("}")); var get_spintext1 = get_spintext.substring(msg.indexOf("{")); var explode_kurawal_buka = msg.split("{"); var explode = explode_kurawal_buka[1].split("|"); var spintext = explode[Math.floor(Math.random() * explode.length)]; msg = msg.replace(get_spintext1, spintext); msg = msg.replace("}", "", spintext); msg = msg.replace("|", "", spintext); } return msg; } function woowaEcoSendWa(no_wa, msg, key) { var msg = spinText(msg); var param = { "phone_no" : no_wa, "message" : msg, "key" : key, }; var url = "http://116.203.92.59/api/async_send_message", payload = JSON.stringify(param), headers = { "contentType": "application/json" }, options = { 'method':'post', 'payload':payload, 'headers': headers, 'contentType':'application/json', 'muteHttpExceptions': true }; var response = UrlFetchApp.fetch(url, options); var data = response.getContentText(); Logger.log(data); return; } function woowaAndroidV1SendWa(no_wa,msg,player_id) { var msg = spinText(msg); var param = { 'type': 'Reminder', 'message': msg, 'no_wa': no_wa }; var url = 'https://onesignal.com/api/v1/notifications'; var data = { 'app_id': '429d3472-da0f-4b2b-a63e-4644050caf8f', 'include_player_ids': [player_id], 'data': param, 'contents': { 'en': 'Woowa Title' }, 'headings': { 'en': 'Woowa Title' } }; var payload = JSON.stringify(data); var headers = { 'Content-Type': 'application/json', 'Authorization': 'Basic NjY0NzE3MTYtMzc3ZC00YmY5LWJhNzQtOGRiMWM1ZTNhNzBh' }; var options = { 'method': 'post', 'payload': payload, 'headers': headers, 'muteHttpExceptions': !![] }; var response = UrlFetchApp.fetch(url, options); var result = response.getContentText(); Logger.log(result); return; } function woowaAndroidV2SendWa(no_wa,msg,player_id) { var msg = spinText(msg); var url = 'https://fcm.googleapis.com/fcm/send'; var data = { "to": player_id, "data": { "number": no_wa, "message": msg } }; var payload = JSON.stringify(data); var headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer AIzaSyCyXH1aC4rWgMQhaJuQLUTDXfWRBgrCZF4' }; var options = { 'method': 'post', 'payload': payload, 'headers': headers, 'muteHttpExceptions': !![] }; var response = UrlFetchApp.fetch(url, options); var result = response.getContentText(); Logger.log(result); return; } function woowaCrmV2SendWa(no_wa,msg,deviceid) { var msg = spinText(msg); var url = 'https://crm.woo-wa.com/send/message-text'; var data = { "deviceId": deviceid, "number": no_wa, "message": msg }; var headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Cache-Control': 'no-cache' }; var options = { 'method': 'post', 'payload': data, 'headers': headers, 'muteHttpExceptions': !![] }; var response = UrlFetchApp.fetch(url, options); var result = response.getContentText(); Logger.log(result); return; } function woowaMulticsSendWa(no_wa,msg,deviceKey) { var msg = spinText(msg); var url = 'https://multics.woo-wa.com/api/srv1/send-text'; var data = { "number": no_wa, "message": msg }; var headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'device-key': deviceKey, 'Cache-Control': 'no-cache' }; var options = { 'method': 'post', 'payload': data, 'headers': headers, 'muteHttpExceptions': !![] }; var response = UrlFetchApp.fetch(url, options); var result = response.getContentText(); Logger.log(msg); Logger.log(result); return; } 

This script is used to make Woowa Add-on!

Tutorial Links
Google Docs

Woowa Server Partner

Generate QR

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/generate_qr';

$license = '5c286f201xxxx';

$data = array(
    "license" => $license,
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

$res = curl_exec($ch);

This endpoint is used to generate qr code image. If successful, you will get the file name to retrieve the file. To get an image file do curl with the parameter file name.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/generate_qr

POST Parameters

Parameter Description
license For authentication, you cant get from http://woo-wa.com

Response

Parameter Description
not_valid_ip System IP is not registered.
failed WhatsApp number not registered.
port_down The system is not ready or not active.
file_name Qrcode file name.

QR Status

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/qrstatus';

$license = '5c286f201xxxx';

$data = array(
    "license" => $license,
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

echo $res = curl_exec($ch);

This endpoint is used check if the WhatsApp status on HP is connected with Woowa server.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/qrstatus

POST Parameters

Parameter Description
license For authentication, you cant get from http://woo-wa.com

Response

Parameter Description
key Response
message Message depends on status
status phone_offline etc

Get Report JSON

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/report_json';

$license = '5c286f201xxxx';
$time_choose = 'today'; // interval

$data = array(
    "license" => $license,
    "time_choose" => $time_choose,
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

echo $res = curl_exec($ch);

This endpoint is used to get report.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/report_json

POST Parameters

Parameter Description
license For authentication, you cant get from http://woo-wa.com
time_choose Time Interval : today, yesterday, 7days, month, month_back

Response

Parameter Description
status success/failed
message wrong_time_choose,no_data,not_exists
data JSON status, message_type, tanggal (date), penerima (received), message_id

Get Status Bulk ID

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/bulk_check_id';

$license = '5c286f201xxxx';
$bulk_msg_id = '1599844649xxxx,1599876923xxxx';

$data = array(
    "license" => $license,
    "bulk_msg_id" => $bulk_msg_id,
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

echo $res = curl_exec($ch);

This endpoint is used to get status bulk message.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/bulk_check_id

POST Parameters

Parameter Description
license For authentication, you cant get from http://woo-wa.com
bulk_msg_id Message ID, if you want to get more, you can use comma (,)

Response

Parameter Description
status Message Status ( success, number_not_found etc. )
msg_id Message ID

Get Key

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/get_key';

$license = '5c286f201xxxx';
$email = '[email protected]';

$data = array(
    "license" => $license,
    "email" => $email,
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

echo $res = curl_exec($ch);

This endpoint is used to get key.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/get_key

POST Parameters

Parameter Description
license For authentication & get your number in our database, you cant get your key from http://woo-wa.com
email For authentication, you cant get from http://woo-wa.com

Response

Parameter Description
status Status ( success, failed etc. )
message Message Status ( Successfully to Get Key, +6208888_not_your_client etc. )
key Your Key

Add Bot

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/add_bot';

$license = '5c286f201xxxx';

$data = array(
    "license" => $license,
    "bot_keyword" => "hey",
    "bot_response" => "hello",
    "bot_type" => "match",
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

echo $res = curl_exec($ch);

Response:

{
    "message": "Add bot successfully.",
    "status": "success"
}

This endpoint is used to add bot.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/add_bot

POST Parameters

Parameter Description
license For authentication & get your number in our database, you cant get your key from http://woo-wa.com
bot_keyword Keywoard message from sender
bot_response Response message sent to sender
bot_type Bot type
- match, Keyword equals input
- partial, Keyword is similar to the beginning of the input
- partial_all, Keyword is similar to what is in the input

Response

Parameter Description
status Status ( success, failed etc. )
message Message Status ( Add bot succesfully etc. )

Get Bot

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/get_bot';

$license = '5c286f201xxxx';

$data = array(
    "license" => $license
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

echo $res = curl_exec($ch);

Response:

{
    "data": {
        "0": {
            "action_type": "",
            "keyword": "hey",
            "match_type": "match",
            "text": "hellooo",
            "text_type": "text"
        }
    },
    "message": "Get bot success",
    "status": "success"
}

This endpoint is used to get bot.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/get_bot

POST Parameters

Parameter Description
license For authentication & get your number in our database, you cant get your key from http://woo-wa.com

Response

Parameter Description
status Status ( success, failed etc. )
message Message Status ( Get bot succesfully etc. )
data[id] id is bot id, use to delete bot
data[id]action_type Bot action_type
data[id]keyword Bot keyword
data[id]match_type Bot type
data[id]text Bot response
data[id]text_type Bot text_type

Delete Bot

Sample script

Get license from http://woo-wa.com

$url = 'https://go.woo-wa.com/v4.0/wa_partner/delete_bot';

$license = '5c286f201xxxx';

$data = array(
    "license" => $license,
    "id"      => 0, // id data from api get_bot
);

$data_string = http_build_query($data);

$ch = curl_init($url);
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, 360);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Authorization: Basic dXNtYW5ydWJpYW50b3JvcW9kcnFvZHJiZWV3b293YToyNjM3NmVkeXV3OWUwcmkzNDl1ZA=='
));

echo $res = curl_exec($ch);

Response:

{
    "message": "Delete bot successfully.",
    "status": "success"
}

This endpoint is used to delete bot.

HTTP Request

POST https://go.woo-wa.com/v4.0/wa_partner/delete_bot

POST Parameters

Parameter Description
license For authentication & get your number in our database, you cant get your key from http://woo-wa.com
id Id bot you can get from api get_bot

Response

Parameter Description
status Status ( success, failed etc. )
message Message Status ( Delete bot successfully. etc. )

Contact Us


















php