0

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?

Amran
  • 627
  • 3
  • 11
  • 30

4 Answers4

2

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.

Red_Box
  • 50
  • 5
2

Try this one :

in src/Constants.php on line 22, change into

const WHATSAPP_VER = '2.17.242';

in src/Constants.php on line 27, change into

const WHATSAPP_USER_AGENT = 'WhatsApp/2.17.242 Android/4.3 Device/Xiaomi-HM_1SW';

in src/token.php on line 10, change into

$classesMd5 = 'ziYneeSZm5qExsEFX/AoMQ=='; // 2.17.242

Hope this helps.

https://github.com/tgalal/yowsup/issues/1905

0

I have changed the value of the constant variables in the file src/Constants.php : const WHATSAPP_VER = '2.18.371'; const WHATSAPP_USER_AGENT = 'WhatsApp/2.18.371 Android/4.3 Device/Xiaomi-HM_1SW';

and in the file src/token.php $classesMd5 = 'sdGH+cA0CQfRGvQVnhZWDw==';

After that, I don't get an old_version message.

0

Try this one:

_MD5_CLASSES = "5eItLCbGXx3CKpybxo81/A=="

_VERSION = "2.19.15"

windupurnomo
  • 1,121
  • 1
  • 11
  • 22