• 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"

Webhook Setup for Wa Gateway | Multi device BETA | V3.0 MPWA MD

I alrady put webhook in mydomain.com/webhook.php
1653030436889.png
*why line number 7 & 8 become like that ? i just copy from rest api --> webhook menu

file whatsapp.txt also get updated
1653029998269.png

but everytime write "hai" I didn't get any reply...
- i already restart the nodejs
replace line code 7 and 8

Code:
$message = strtolower($data['message']);
$from = strtolower($data['from']);
 
1653145274200.png
already create whatsapp.txt then permission 777
this my webhook.php
PHP:
<?php
 
 
 header('content-type: application/json');
 $data = json_decode(file_get_contents('php://input'), true);
 file_put_contents('whatsapp.txt', '[' . date('Y-m-d H:i:s') . "]\n" . json_encode($data) . "\n\n", FILE_APPEND);                                               
$message = strtolower($data['message']);
$from = strtolower($data['from']);
 $respon = true;
 
 // auto respond text   
 function sayHello(){   
 return ["text" => 'Halloooo!'];
             }
 
 // auto respond gambaar           
function gambar(){
 return [
     'image' => ['url' => 'https://seeklogo.com/images/W/whatsapp-logo-A5A7F17DC1-seeklogo.com.png'],
     'caption' => 'Logo whatsapp!'
 ];   
}
 
//auto respond button
 function button(){
     $buttons = [
         ['buttonId' => 'id1', 'buttonText' => ['displayText' => 'BUTTON 1'], 'type' => 1], // button 1 //
         ['buttonId' => 'id2', 'buttonText' => ['displayText' => 'BUTTON 2'], 'type' => 1], // button 2
         ['buttonId' => 'id3', 'buttonText' => ['displayText' => 'BUTTON 3'], 'type' => 1], // button 3
     ];
     $buttonMessage = [
         'text' => 'HOLA, INI ADALAH PESAN BUTTON',
         'footer' => 'ini pesan footer',
         'buttons' => $buttons,
         'headerType' => 1
     ];
     return $buttonMessage;
 }
 
 // auto respon lists
function lists(){
 $sections = [
        [
            "title" => "This is List menu",
            "rows" => [
            ["title" => "List 1", "description" => "this is list one"],
            ["title" => "List 2", "description" => "this is list two"],
        ]
    ]
];
 
 $listMessage = [
  "text" => "This is a list",
  "title" => "Title Chat",
  "buttonText" => "Select what will you do?",
  "sections" => $sections
 ];
 
 return $listMessage; 
 }
 
 
 if($message === 'hai'){
     $respon = sayHello();
 } else if($message === 'gambar'){
     $respon = gambar();
 } else if($message === 'tes button'){
     $respon = button();
 } else if($message === 'lists msg'){
     $respon = lists();
 }
 echo json_encode($respon);
?>

1653145641147.png
already set in webhook in dashboard
already restart node.
already try rescan number,
i try other autoreply work
i try said hai from webhook, i refresh file manager then check whatsapp.txt but not rewrite
anyone have other solution ?
thanks before
 
1653145274200.png
already create whatsapp.txt then permission 777
this my webhook.php



1653145641147.png
already set in webhook in dashboard
already restart node.
already try rescan number,
i try other autoreply work
i try said hai from webhook, i refresh file manager then check whatsapp.txt but not rewrite
anyone have other solution ?
thanks before
Are you trying it on shared hosting?
Is autoreply working?
 
1653146726115.png 1653146743270.png
yes bro work autoreply
but not work autoreply from webhook
If autoreply working then webhook should work.

Can you share how to make autoreply to work on shared hosting?
 
If autoreply working then webhook should work.

Can you share how to make autoreply to work on shared hosting?
1653148803033.png
I didn't make any changes to get autoreply to work.
i just set Server Type shared : Hosting Shared then port node js : 3200
maybe mistake from provider hosting if ur autoreply not work.
because my autoreply not work on provider hosting before, than i build to other provider hosting my autoreply work..but webhook not work
 
1653148803033.png
I didn't make any changes to get autoreply to work.
i just set Server Type shared : Hosting Shared then port node js : 3200
maybe mistake from provider hosting if ur autoreply not work.
because my autoreply not work on provider hosting before, than i build to other provider hosting my autoreply work..but webhook not work
Try webhook link without https:// use http:// instead.
 
how to add 2 response or more response in webhook ?
1653169528034.png
i try said 'hai' but just response 'gambar', not response 'sayHello and gambar'..
 

Hello friends I have practiced all the advice concerning the Webhook until now the auto reply does not work I am a Mutualized VIP host at planethoster.com Ps: the rest works well except the auto reply

Please a good samaritan to help me thank you in advance

 
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