Whatsapp API Gateway

Method POST
API URL https://jagoanpedia.com/api/whatsapp-text
Parameter Description
key API Key for WhatsApp
to Target number (628xxx / 08xxx)
text Message text
Example Request (PHP cURL)
<?php
$url = "https://jagoanpedia.com/api/whatsapp-text";
$data = [
    "key" => "YOUR_API_KEY",
    "to" => "628xxxxxx",
    "text" => "This is a test text"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);

echo "Response: " . $response;
?>
                            
Success Response:
{
    "status": "true",
    "message": "WhatsApp API Jagoanpedia successfully sent the message"
}
                            
Failed Response:
{
    "status": "false",
    "message": "Invalid key"
}
                            
Method POST
API URL https://jagoanpedia.com/api/whatsapp-media
Parameter Description
key API Key for WhatsApp
to Target number (628xxx / 08xxx)
media_type image, video, audio, pdf, xls, xlsx, doc, docx, zip
caption Optional for image or video
url Direct link to the media file
Example Request (PHP cURL)
<?php
$url = "https://jagoanpedia.com/api/whatsapp-media";
$data = [
    "key" => "YOUR_API_KEY",
    "to" => "628xxxxxx",
    "media_type" => "image",
    "caption" => "This is a test image",
    "url" => "https://picsum.photos/200"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);

echo "Response: " . $response;
?>
                            
Success Response:
{
    "status": "true",
    "message": "WhatsApp API Jagoanpedia successfully sent the media"
}
                            
Failed Response:
{
    "status": "false",
    "message": "Invalid key"
}
                            
Example Webhook:
{
  "message" : "message",
  "bufferImage" : "base64 image / null if message not contain image",
  "from" : "number whatsapp sender"
}