NAV Navbar
php

Introduction

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 : 5c286f1ed7121
key : 13922647945306acd1b1116ca9b29292f382cdf9ffda3414

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

Send WA

Send Message Sync

Sample Script

$key='e1b20eda317b7c6e3b1ef920f2273e70147ac7be8c7a2xxx';
$url='http://116.203.92.59/api/send_message';
$data = array(
  "phone_no"=> '+628975835238',
  "key"		=>$key,
  "message"	=>'tes woowa api v3.0'
);
$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.92.59/api/send_message

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
message text to be sent.

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='e1b20eda317b7c6e3b1ef920f2273e70147ac7be8c7a2xxx';
$url='http://116.203.92.59/api/async_send_message';
$data = array(
  "phone_no"=> '+628975835238',
  "key"		=>$key,
  "message"	=>'tes woowa api v3.0'
);
$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.92.59/api/async_send_message

POST Parameters

Parameter Description
phone_no Client's whatsapp number.
key Key partner.
message text to be sent.

Response

String Description
15683286008530 ID queue

Send Image Sync

Sample Script

$key='e1b20eda317b7c6e3b1ef920f2273e70147ac7be8c7a2xxx';
$url='http://116.203.92.59/api/send_image_url';
$img_url='https://my.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"	=>'tes woowa api v3.0'
);
$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.92.59/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='e1b20eda317b7c6e3b1ef920f2273e70147ac7be8c7a2xxx';
$url='http://116.203.92.59/api/async_send_image_url';
$img_url='https://my.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"	=>'tes woowa api v3.0'
);
$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.92.59/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='e1b20eda317b7c6e3b1ef920f2273e70147ac7be8c7a2xxx';
$url='http://116.203.92.59/api/send_file_url';
$file_path='https://my.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png';
$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.92.59/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='e1b20eda317b7c6e3b1ef920f2273e70147ac7be8c7a2xxx';
$url='http://116.203.92.59/api/async_send_file_url';
$file_path='https://my.woo-wa.com/wp-content/uploads/2018/12/Logo-Woo-WA-PNG-Berwarna-150px.png';
$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.92.59/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.

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.92.59
    [message] => Lix
    [keyword] => default
    [port] => 3787
)

This endpoint is used to get data webhook.

Chrome/Opera Extension

Send Message

Sample Script

$url='https://fcm.googleapis.com/fcm/send';
$data = array(
  "to"=>'fpPpZ9We6nU:APA91bHhb7oDQ_f3XCNiz3lT4aXsbCms4BY1zX66PXmO-xxxxx',
  "data"=>array(
    "number" => '+628975835238',
    "text" => 'bismillah woowa chrome extension'
  )
);
$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(
  'Authorization: key=AAAAHDQsTmE:APA91bHW3XpRwfFpWYSMrSkzXJcoApJ5WIbplbCSNgMS4Y9nsDCHEl35y8oBQLez9lwfqQlYM9fIvUav89U1RDC0AIBKTuGvpfsdQ8YbWIm6pRIGMLLeS3zeuLX8xI7zFFZ1F_l8bmMQ',
  'Content-type: application/json'
));
echo $res=curl_exec($ch);
curl_close($ch);

Response:

{
  "status": "1/0",
  "failure": "1/0",
}

This endpoint is used to send message.

HTTP Request

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

Header Parameters

Parameter Description
Authorization key=AAAAHDQsTmE:APA91bHW3XpRwfFpWYSMrSkzXJcoApJ5WIbplbCSNgMS4Y9nsDCHEl35y8oBQLez9lwfqQlYM9fIvUav89U1RDC0AIBKTuGvpfsdQ8YbWIm6pRIGMLLeS3zeuLX8xI7zFFZ1F_l8bmMQ
Content-type application/json

Body Parameters

Parameter Description
to Token from chrome/opera extension.
data[number] Destination WA number.
data[text] Bismillah woowa chrome extension

Response

JSON Attribute Description
success 1/0
failure 1/0

Woowandroid

Send Message

Sample Script

$param = array(
    'app_id' => '429d3472-da0f-4b2b-a63e-464405xxxxx', //app id
    'include_player_ids' => ['20fe93ea-6bf4-428c-87e5-f7aa6xxxxx'], //cs id
    'data' => array(
        "type"      => 'Reminder', //opsional Reminder/After Checkout/Pending Payment/dll editable
        "message"   => 'Bismillah 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
$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

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

Parameters

Parameter Description
license License from woo-wa.com

Contact Us


















php