Auth Failed!
Hi
I'm setting up yowsup-cli for the first time. I've successfully been through:
- Set up config file
- $ ./yowsup-cli -c ./cfg -r sms
- $ ./yowsup-cli -c ./cfg -R [code]
- Save password in config file
However I get an "Auth Failed!" when I try other operations.
Here I ran a --exists to demonstrate that I have registered correctly:
macreg:src reg$ ./yowsup-cli -c ./cfg -e
status: ok
kind: free
pw: qt8rw/Oj0gZWDIhjDereUvt6ops=
price: R7,99
price_expiration: 1402586711
currency: ZAR
cost: 7.99
login: 27712345678
type: existing
expiration: 1431029922
and then I updated the new password in my confg file:
macreg:src reg$ cat cfg
cc=27
phone=00712345678
id=458ab6d4-9319-47a6-c7d2-e230a12c7e66
password=qt8rw/Oj0gZWXIhjDereUvt6ops=
but when I run --listen, auth fails?
macreg:src reg$ ./yowsup-cli -c ./cfg -d -l
YowsupConnectionManager: >>>>>>>> AUTH CALLED
BinTreeNodeReader: Reader init
YowsupAuth: Connecting to c2.whatsapp.net
WAuth: Yowsup WAUTH-1 INIT
WAuth: Starting stream
WAuth: Sending Features
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:
<stream:features>
<receipt_acks>
</receipt_acks>
<w:profile:picture type="all">
</w:profile:picture>
<w:profile:picture type="group">
</w:profile:picture>
<notification type="participant">
</notification>
<status>
</status>
</stream:features>
WAuth: Sending Auth
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:
<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" user="00712345678" mechanism="WAUTH-1">
</auth>
WAuth: Read stream start
WAuth: Read features and challenge
BinTreeNodeReader: Incoming
BinTreeNodeReader:
<stream:features>
<receipt_acks>
</receipt_acks>
<w:profile:picture type="all">
</w:profile:picture>
</stream:features>
WAuth: GOT FEATURES !!!!
BinTreeNodeReader: Incoming
BinTreeNodeReader:
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
????????Z??????T?</challenge>
WAuth: GOT CHALLENGE !!!!
WAuth: Sending Response
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
?????A????d???wj[?????85
?A{],?9??Z"M????</response>
WAuth: Read success
BinTreeNodeReader: Incoming
BinTreeNodeReader:
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<not-authorized>
</not-authorized>
</failure>
WAuth: Login Status: failure
YowsupAuth: Authentication failed!!
Auth Failed!
I also tried the wauth2 branch without success:
macreg:src reg$ ./yowsup-cli -c ./cfg -d -l
YowsupConnectionManager: >>>>>>>> AUTH CALLED
BinTreeNodeReader: Reader init
YowsupAuth: Connecting to c2.whatsapp.net
WAuth2: Yowsup WAUTH-2 INIT
WAuth2: Starting stream
WAuth2: Sending Features
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:
<stream:features>
</stream:features>
WAuth2: Sending Auth
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:
<auth passive="false" user="00712345678" mechanism="WAUTH-2">
</auth>
WAuth2: Read stream start
WAuth2: Read features and challenge
BinTreeNodeReader: Incoming
BinTreeNodeReader:
<stream:features>
</stream:features>
WAuth2: GOT FEATURES !!!!
BinTreeNodeReader: Incoming
BinTreeNodeReader:
<challenge>
??)? ??cxD??d5?Tj_i?</challenge>
WAuth2: GOT CHALLENGE !!!!
WAuth2: Sending Response
22e56dca47c2e76309a587fad8664ad7b05ad5ef
e02a9f7239e4b2d247e164c437a3745987672114
026bb42829b60eff187b67b9f4058dc715f4817f
5aa01c93b48097f09867c90343c13760b1086dca
BinTreeNodeWriter: Outgoing
BinTreeNodeWriter:
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
Ӭ?n????nl?{
??????o??c
?I??%+??*?(Z?E</response>
WAuth2: Read success
BinTreeNodeReader: Incoming
BinTreeNodeReader:
<failure>
<not-authorized>
</not-authorized>
</failure>
WAuth2: Login Status: failure
YowsupAuth: Authentication failed!!
Auth Failed!
Am I doing something wrong?
Many thanks, Reg
Remove the leading zeroes in your phone number
Thanks!!
This is why I don't usually read the docs: https://github.com/tgalal/yowsup/wiki/yowsup-cli#your-login-credentials ;)
Summary, I needed my full country code as the phone number, not padding zeros, as the docs in the above link suggested, e.g.:
macreg:src reg$ cat cfg
cc=27
phone=27712345678
id=458ab6d4-9319-47a6-c7d2-e230a12c7e66
password=qt8rw/Oj0gZWXIhjDereUvt6ops=
Since I got the same issue the only way I found to solve it was to use the same way followed by file yowsup-cli:
You have to call this line before using the password to try to login:
password = base64.b64decode(bytes(PASSWORD.encode('utf-8')))
The problem appears also in the doc: https://github.com/tgalal/yowsup/wiki/Yowsup-Library-Documentation#invoking-methods
We cannot connect to WA withous encoding the password first.
@regstraton how you wauth2 tests? that's what you have to do to use wauth2?
Hi Tarek,
Any idea, under what circumstances WhatsApp blocks a number? Sending 1 message to 30-50 numbers over the period of 2-3 days spread across 10-15 minutes resulted in blocking :(. Any set of rules? Would like to follow them strictly if known.
Looking forward to hear from you. Kuldip
Hi canercadon
while using yowsup-cli to login
do i have to obtain password by doing this password = base64.b64decode(bytes(PASSWORD.encode('utf-8')))
i have got the password as N6Yjce6Rh0gscc7MACY43MtStN0= when i apply above formula it would be 7\xa6#q\xee\x91\x87H,q\xce\xcc\x00&8\xdc\xcbR\xb4\xdd
i cant use the above string to login it throws an error
could you please help me , i am not able to activate my account , it says offline