• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Whatsapp Rest Api For Waziper/Whatsapp Module For Stackposts

Whatsapp Rest Api For Waziper/Whatsapp Module For Stackposts Version 5.0.4

No permission to download
Friends, yesterday I developed a WordPress plugin that connects with the Waziper's REST API and sends notification of new orders and status changes to customers.
My problem is that the Waziper API works well during the first few hours, but after that, even though the response is still successful, it no longer sends the messages. However, if I create the instance again, it starts working again.
Does anyone know or have any idea what might be happening?
 
  • Like
Reactions: antony7 and leox433
Friends, yesterday I developed a WordPress plugin that connects with the Waziper's REST API and sends notification of new orders and status changes to customers.
My problem is that the Waziper API works well during the first few hours, but after that, even though the response is still successful, it no longer sends the messages. However, if I create the instance again, it starts working again.
Does anyone know or have any idea what might be happening?
share this plugin, this is awesome 👏 👏 👏 🥇 🥇 🥇 🏆🏆
 
Friends, yesterday I developed a WordPress plugin that connects with the Waziper's REST API and sends notification of new orders and status changes to customers.
My problem is that the Waziper API works well during the first few hours, but after that, even though the response is still successful, it no longer sends the messages. However, if I create the instance again, it starts working again.
Does anyone know or have any idea what might be happening?
I noticed that this happens only after sending in bulk, but if you send only through the API, it seems that this error does not occur, I've been testing it for 2 days without interruption.

I'm creating a module for Perfex CRM too!!
 
Friends, yesterday I developed a WordPress plugin that connects with the Waziper's REST API and sends notification of new orders and status changes to customers.
My problem is that the Waziper API works well during the first few hours, but after that, even though the response is still successful, it no longer sends the messages. However, if I create the instance again, it starts working again.
Does anyone know or have any idea what might be happening?
I also create one in php to send notification for new uploaded songs and works fine without interruption.
 
I also create one in php to send notification for new uploaded songs and works fine without interruption.
nice bro , i am making some more tests , im affraid that the generated message whit the order details maybe is causing some error, im coding now a way to log the communication , and will try to detect the error.
once i have this ready i share here for everyone
 
  • Like
Reactions: leox433

WEBHOOKS FIXED!! VERY IMPORTANT!!​

To fix: go to waziper server folder then /waziper/waziper.js

Delete lines 308 to 316
and pase this code:


Code:
webhook: async function(instance_id, data){
         var tb_webhook = await Common.db_query("SHOW TABLES LIKE 'sp_whatsapp_webhook'");
        if(tb_webhook){
             var webhook = await Common.db_query("SELECT * FROM sp_whatsapp_webhook WHERE status = 1 AND instance_id = '" + instance_id + "'");
            if(webhook){
                axios.post(webhook.webhook_url, { instance_id: instance_id, data: data }).then((res) => {}).catch((err) => {});
            }
        }
    },
Followed it brother, Changed the lines, restarted node app, set webhook. but still there is no response on webhook.site whenever I receive a message.
 
Followed it brother, Changed the lines, restarted node app, set webhook. but still there is no response on webhook.site whenever I receive a message.
do you have any code in the file that receive the webhook?
if not , create a file and add this code
<?php
// Verificar si se recibieron datos por POST o GET
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Datos recibidos por POST
$datos = $_POST;
} else {
// Datos recibidos por GET
$datos = $_GET;
}

// Convertir los datos en formato JSON
$datos_json = json_encode($datos);

// Guardar los datos en un archivo de texto
$archivo = 'datos_recibidos.txt';
file_put_contents($archivo, $datos_json . PHP_EOL, FILE_APPEND);

// Mostrar los datos en pantalla
echo '<pre>';
print_r($datos);
echo '</pre>';
?>


this will receive any method and will display the data and also record the data to a txt
good luck
 
nice bro , i am making some more tests , im affraid that the generated message whit the order details maybe is causing some error, im coding now a way to log the communication , and will try to detect the error.
once i have this ready i share here for everyone
Nice try to to log errors handling and result too ...then you will find issue, I think this will works
 
do you have any code in the file that receive the webhook?
if not , create a file and add this code
<?php
// Verificar si se recibieron datos por POST o GET
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Datos recibidos por POST
$datos = $_POST;
} else {
// Datos recibidos por GET
$datos = $_GET;
}

// Convertir los datos en formato JSON
$datos_json = json_encode($datos);

// Guardar los datos en un archivo de texto
$archivo = 'datos_recibidos.txt';
file_put_contents($archivo, $datos_json . PHP_EOL, FILE_APPEND);

// Mostrar los datos en pantalla
echo '<pre>';
print_r($datos);
echo '</pre>';
?>


this will receive any method and will display the data and also record the data to a txt
good luck
This already I built when webhook not works to try to cpature response in cache file ...but now when it fixed lets give on try to this too..thank you
 
do you have any code in the file that receive the webhook?
if not , create a file and add this code
<?php
// Verificar si se recibieron datos por POST o GET
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Datos recibidos por POST
$datos = $_POST;
} else {
// Datos recibidos por GET
$datos = $_GET;
}

// Convertir los datos en formato JSON
$datos_json = json_encode($datos);

// Guardar los datos en un archivo de texto
$archivo = 'datos_recibidos.txt';
file_put_contents($archivo, $datos_json . PHP_EOL, FILE_APPEND);

// Mostrar los datos en pantalla
echo '<pre>';
print_r($datos);
echo '</pre>';
?>


this will receive any method and will display the data and also record the data to a txt
good luck
Ok. Thank you for responding brother. May I know where I should create this file? is there any documentation for setting up a webhook in waziper and receiving a response when someone messages? thank you so much for helping brother.
 
do you have any code in the file that receive the webhook?
if not , create a file and add this code
<?php
// Verificar si se recibieron datos por POST o GET
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Datos recibidos por POST
$datos = $_POST;
} else {
// Datos recibidos por GET
$datos = $_GET;
}

// Convertir los datos en formato JSON
$datos_json = json_encode($datos);

// Guardar los datos en un archivo de texto
$archivo = 'datos_recibidos.txt';
file_put_contents($archivo, $datos_json . PHP_EOL, FILE_APPEND);

// Mostrar los datos en pantalla
echo '<pre>';
print_r($datos);
echo '</pre>';
?>


this will receive any method and will display the data and also record the data to a txt
good luck
I have added the code to a file on my other website and saved it as webhook.php. then used the file URL for setting receiving webhook like this - https://panel_domain_name/api/set_webhook?webhook_url=https%3A%2F%2Fother_domain_name%2Fwebhook.php&enable=true&instance_id=609ACF283XXXX&access_token=645a5d6xxxxxx

Then sent a WhatsApp message to that number.

But still, the text file that your code generates is empty. No response is posted to the file.
 
Ok. Thank you for responding brother. May I know where I should create this file? is there any documentation for setting up a webhook in waziper and receiving a response when someone messages? thank you so much for helping brother.
I have added the code to a file on my other website and saved it as webhook.php. then used the file URL for setting receiving webhook like this - https://panel_domain_name/api/set_webhook?webhook_url=https%3A%2F%2Fother_domain_name%2Fwebhook.php&enable=true&instance_id=609ACF283XXXX&access_token=645a5d6xxxxxx

Then sent a WhatsApp message to that number.

But still, the text file that your code generates is empty. No response is posted to the file.
Inbox me
 
  • Like
Reactions: _Astro_
the correct is like this.
<?php $file = 'data_receive.txt'; // Check if it is a POST request if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Checks that the token in the URL equals 'your_passwd_so_that_no_one_overloads_the_server' if ($_GET['token'] === 'your_passwd_so_that_no_one_overloads_the_server') { // Get the JSON from the request body $json = file_get_contents('php://input'); // Execute logic only if token is valid $data = json_decode($json, true); // Do what you want with JSON data // Write JSON to a file file_put_contents($arquivo, $json . PHP_EOL, FILE_APPEND); // ... } } elseif ($_SERVER['REQUEST_METHOD'] === 'GET') { // Silent is gold } ?>

create a callback folder
creates a file like receive.php
put it in the root of the domain or subdomain inside the callback folder
writes to the webhook in each profile like
POST https://your_url.com/api/set_webhook?webhook_url=https://your_url.com/receive.php?token=your_passwd_so_that_no_one_overloads_the_server

your webhook callback is ready
 
the correct is like this.
<?php $file = 'data_receive.txt'; // Check if it is a POST request if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Checks that the token in the URL equals 'your_passwd_so_that_no_one_overloads_the_server' if ($_GET['token'] === 'your_passwd_so_that_no_one_overloads_the_server') { // Get the JSON from the request body $json = file_get_contents('php://input'); // Execute logic only if token is valid $data = json_decode($json, true); // Do what you want with JSON data // Write JSON to a file file_put_contents($arquivo, $json . PHP_EOL, FILE_APPEND); // ... } } elseif ($_SERVER['REQUEST_METHOD'] === 'GET') { // Silent is gold } ?>

create a callback folder
creates a file like receive.php
put it in the root of the domain or subdomain inside the callback folder
writes to the webhook in each profile like
POST https://your_url.com/api/set_webhook?webhook_url=https://your_url.com/receive.php?token=your_passwd_so_that_no_one_overloads_the_server

your webhook callback is ready
It worked brother. Thank you so much.
 
  • Love
Reactions: robsong
the correct is like this.
<?php $file = 'data_receive.txt'; // Check if it is a POST request if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Checks that the token in the URL equals 'your_passwd_so_that_no_one_overloads_the_server' if ($_GET['token'] === 'your_passwd_so_that_no_one_overloads_the_server') { // Get the JSON from the request body $json = file_get_contents('php://input'); // Execute logic only if token is valid $data = json_decode($json, true); // Do what you want with JSON data // Write JSON to a file file_put_contents($arquivo, $json . PHP_EOL, FILE_APPEND); // ... } } elseif ($_SERVER['REQUEST_METHOD'] === 'GET') { // Silent is gold } ?>

create a callback folder
creates a file like receive.php
put it in the root of the domain or subdomain inside the callback folder
writes to the webhook in each profile like
POST https://your_url.com/api/set_webhook?webhook_url=https://your_url.com/receive.php?token=your_passwd_so_that_no_one_overloads_the_server

your webhook callback is ready
After researching in this forum I have tried to configure this module with Prefex webhooks and it has been impossible.

Could you help me?
 
I noticed that this happens only after sending in bulk, but if you send only through the API, it seems that this error does not occur, I've been testing it for 2 days without interruption.

I'm creating a module for Perfex CRM too!!
I have a module purchased for perfex that uses whatsapp cloud api, but I'm interested in using the whatsapp rest api.

have you been able to use it in perfex?
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock