7

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

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
Erick Vivanco
  • 239
  • 4
  • 10

1 Answers1

1

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

OskarD90
  • 613
  • 2
  • 8
  • 26