phpwhatsapi

Get Whatsapp Password from Whatsapp api


How to get the whatsapp password using the whatsapp api?

I am still learning on using the api and have no idea to use it. I'am using sublime code editor for the code. Below is the sample code that I receive from one of the tutorials.

require_once('Chat-API/src/Registration.php');
username = "6012xxxxxxx";
$debug = true;

// Create a instance of Registration class.
$r = new Registration($username, $debug);

$r->codeRequest('sms'); // could be 'voice' too`

When I execute it, I receive this error:

Array ( [cc] => 60 [in] => 6012xxxxxxx [lg] => en [lc] => MY [id] => 蜀��|#b�պ�`���x [token] => IAW+aljx1hbtx0Vh/sqxJmKytyc= [mistyped] => 6 [network_radio_type] => 1 [simnum] => 1 [s] => [copiedrc] => 1 [hasinrc] => 1 [rcmatch] => 1 [pid] => 5138 [rchash] => 6557f1fa8776a69cc3427a6196467690cb85cc651b36cc7be02062470a72a742 [anhash] => 3c24581d24189c24a487cae2ef84d1c3 [extexist] => 1 [extstate] => 1 [mcc] => 502 [mnc] => 000 [sim_mcc] => 502 [sim_mnc] => 000 [method] => sms ) stdClass Object ( [login] => 6012xxxxxxx [status] => fail [reason] => old_version ) 
Fatal error: Uncaught exception 'Exception' with message 'There was a problem trying to request the code.' in C:\xampp\htdocs\tutorial\whatsapp-api\Chat-API\src\Registration.php:316 Stack trace: #0 C:\xampp\htdocs\tutorial\whatsapp-api\requestCode.php(33): Registration->codeRequest('sms') #1 {main} thrown in C:\xampp\htdocs\tutorial\whatsapp-api\Chat-API\src\Registration.php on line 316

I tried to use Wart application as well but still unable to get the password with the error of bad_token

Is there any other functions or application that I need to add. Is there also a good tutorial or video for this?


Solution

  • I also tried this lib, but got "fail [reason] => old_version". This library is unsupported since 10 Aug 2016. So I think it won't be working.