I use this code
#!/usr/bin/php
<?php
require_once('whatsapp_whatsapi_config.php');
$destinationPhone = 'xxxx';
$w = new WhatsProt($userPhone,0, $userName, $debug);
$w->Connect();
$w->LoginWithPassword($password);
$message = 'WhatsApp';
$w->Message($destinationPhone, $message);
echo "Mensaje enviado exitosamente";
?>
and this error displayed
PHP Fatal error: Uncaught exception 'LoginFailureException' in /var/www/html/whats/src/whatsprot.class.php:2274
Stack trace:
/var/www/html/whats/src/whatsprot.class.php(552): WhatsProt->doLogin()
/var/www/html/whats/whatsapp_whatsapi_send.php(13): WhatsProt->loginWithPassword('Mu7q0hq/vRSLFCU...')
{main}
thrown in /var/www/html/whats/src/whatsprot.class.php on line 2274
I tried use the WART app but the password generated is incorrect
Add a try-catch clause on the line that has $w->LoginWithPassword($password);
and use the getMessage() method on the exception to see what the error message is, and what might be wrong with your login
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With