Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registration returns old_version for Whatsapp Version 2.12.440, bad_token for later version (2.16.2) #1534

Closed
parag opened this issue Apr 21, 2016 · 25 comments

Comments

@parag
Copy link

parag commented Apr 21, 2016

yowsup-cli registration --requestcode sms --phone 91xxxxxxxxxx --cc 91 --mcc 404 --mnc 60 -d
DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.12.440 Android/4.3 Device/Xiaomi-armani'}
DEBUG:yowsup.common.http.warequest:cc=91&in=9986930005&lc=GB&lg=en&sim_mcc=404&sim_mnc=060&mcc=404&mnc=060&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=5428&rchash=2c3d5ddf3b0b4ec9ef2875c26e9493f111a8f4e4ac755e9676c28e73b2604b34&anhash=de2ce769bcc6a4be1da9b06a483c28c3&extexist=1&extstate=1&token=MJKXh7iO735IIOtaUBg6jqozvQs%3D&id=%84%5C%7D%95%D6ef%7B%FD%ED%90%3D%02%D9%E5%B1%5C%1BW%17
DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net
DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=91&in=9986930005&lc=GB&lg=en&sim_mcc=404&sim_mnc=060&mcc=404&mnc=060&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=5428&rchash=2c3d5ddf3b0b4ec9ef2875c26e9493f111a8f4e4ac755e9676c28e73b2604b34&anhash=de2ce769bcc6a4be1da9b06a483c28c3&extexist=1&extstate=1&token=MJKXh7iO735IIOtaUBg6jqozvQs%3D&id=%84%5C%7D%95%D6ef%7B%FD%ED%90%3D%02%D9%E5%B1%5C%1BW%17

INFO:yowsup.common.http.warequest:b'{"status":"fail","reason":"old_version"}\n'
status: b'fail'
reason: b'old_version'

On updating Android version, I get bad token

yowsup-cli registration --requestcode sms --phone 91xxxxxxxxxx --cc 91 --mcc 404 --mnc 60 -d
DEBUG:yowsup.common.http.warequest:{'User-Agent': 'WhatsApp/2.16.2 Android/4.3 Device/Xiaomi-armani', 'Accept': 'text/json'}
DEBUG:yowsup.common.http.warequest:cc=91&in=9986930005&lc=GB&lg=en&sim_mcc=404&sim_mnc=060&mcc=404&mnc=060&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=5604&rchash=d6d53dce57a534a23657fb518d9c1af927884b094330af38c88e37b08a0b6382&anhash=1ff425b1d1827b8c21fef7b69865b6fe&extexist=1&extstate=1&token=MJKXh7iO735IIOtaUBg6jqozvQs%3D&id=t%99%7B-IL%C1%7F%8A%BE%81%14%CC%F9%F5B%3F%A0M%EA
DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net
DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=91&in=9986930005&lc=GB&lg=en&sim_mcc=404&sim_mnc=060&mcc=404&mnc=060&method=sms&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=5604&rchash=d6d53dce57a534a23657fb518d9c1af927884b094330af38c88e37b08a0b6382&anhash=1ff425b1d1827b8c21fef7b69865b6fe&extexist=1&extstate=1&token=MJKXh7iO735IIOtaUBg6jqozvQs%3D&id=t%99%7B-IL%C1%7F%8A%BE%81%14%CC%F9%F5B%3F%A0M%EA
INFO:yowsup.common.http.warequest:b'{"status":"fail","reason":"bad_token"}\n'
status: b'fail'
reason: b'bad_token'

@assegaf
Copy link

assegaf commented Apr 21, 2016

yes, just as predicted on https://blog.whatsapp.com/10000618/end-to-end-encryption they start to block old WA16 protocol, no more registration on 2.12.XX Version ..

@ghost
Copy link

ghost commented Apr 21, 2016

@parag No problems here. And you can't just change the version by yourself, that's why you get bad_token
@assegaf Stop causing panic, WA16 will continue to work for a long time

@parag
Copy link
Author

parag commented Apr 21, 2016

Got it @0xTryCatch . Was confused how to generate signature / md5 class and key. Is that all necessary to upgrade (and test) for version change?

@ghost
Copy link

ghost commented Apr 21, 2016

Yes

@wkurosawa
Copy link

@parag Were you able to register?
I'm also having old_version problem, whether using master or wa16/develop branches..

@parag
Copy link
Author

parag commented Apr 21, 2016

@wkurosawa Not yet. Not able to figure out how to generate signatures.

@coxsy1
Copy link

coxsy1 commented Apr 21, 2016

well.. it's happened to me... :V

@biji
Copy link
Contributor

biji commented Apr 21, 2016

Work for me by updating env like this: https://github.com/mgp25/Chat-API/commit/e3f994059ab466fee6732e99b826de4733c3e9b5

@coxsy1
Copy link

coxsy1 commented Apr 21, 2016

yeaa.. work for me too...
thanks Mr. @biji

On Thu, Apr 21, 2016 at 3:02 PM, biji notifications@github.com wrote:

Work for me by updating env like this: mgp25/Chat-API@e3f9940
https://github.com/mgp25/Chat-API/commit/e3f994059ab466fee6732e99b826de4733c3e9b5


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1534 (comment)

@assegaf
Copy link

assegaf commented Apr 21, 2016

thanks biji and trycatch, work like a charm ...

@r00t4bl3
Copy link

Finally, this fix "old_version" problem. Thank you guys...

@jlguardi
Copy link
Collaborator

Old-version issue fixed in latest master.

@guileh
Copy link

guileh commented May 1, 2016

I'm getting -> fail -> bad_token

@guileh
Copy link

guileh commented May 1, 2016

I changed the token in src/token.php now it's getting ->fail -> missing_param -> token! :(

@tgalal
Copy link
Owner

tgalal commented May 1, 2016

@guileh token.php ? are you lost ?

@guileh
Copy link

guileh commented May 4, 2016

I was! 👍

@ibgithub
Copy link

ibgithub commented Sep 8, 2016

I got bad token right now, please help me

@ibgithub
Copy link

ibgithub commented Sep 8, 2016

I already solved, update in file env_s40.py

_TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1471306425030{phone}"

@makovez
Copy link

makovez commented Jan 22, 2017

how can i get the token? i read this

PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk its a constant, never changes.
$timestamp it's the release time of the app, it's inside the app. Changes in every version.
$phone, your number + country code.

with the constant+timestamp+phone i can generate the token?
how can i get the timestamp?

@narasimha6666
Copy link

How to generate signature / md5 class and key with latest version

@JavierPech
Copy link

Im getting the bad token error. I updated the WHATSAPP_USER_AGENT & WHATSAPP_VER variables to 2.17.223 in constatns php and now i get the bad token error. Please help. PS I've download the latest version of the Chat-Api

@gittempo
Copy link

@JavierPech did you manage to fix the bad_token issue?

What should be token for version 2.17.351

in token.php

  $classesMd5 = 'ry9Xz6kVioQctwA3G9z62Q=='; // 2.12.556

@vinayakvasu
Copy link

$classesMd5 = 'o17G0Imoh/pOmI5FpLpKHQ=='; // 2.17.420

@auyanik
Copy link

auyanik commented Jan 14, 2018

$classesMd5 ='????? '; // 2.18.8

help plss

@azamalvi
Copy link

For latest version you need to change in composer.json file like this
"require": { "whatsapp/chat-api": "dev-master" }
After updating composer, you need to change the Constants like below

Constants.php
const WHATSAPP_VER = '2.18.8';
const WHATSAPP_USER_AGENT = 'WhatsApp/2.18.8 Android/4.3 Device/Xiaomi-HM_1SW';

token.php
$classesMd5 = 'CjxZj9h0ptjV2RRSfH9aYA==';

Hope this will fix problem 🥇

nilsburg pushed a commit to proximity-mad/Chat-API that referenced this issue Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests