Closed xvilo closed 10 years ago
@xvilo Identity: A unique hash generated by your device. If using WART or the API, it is a SHA1 string generated using a combination of your mobile number and specified "password" as a salt.
When logging in you can do this: So
$identity
is not required.
$w = new WhatsProt($username, null, $nickname, $debug);
The problem I see is that your password has not been generated by the server WhatsApp. Did you registered you number with the API or WART? If it is registered right, then you have an invalid password, try requesting a new one.
Well, i have registered the nummer on my device, used the altert APK from Maxters.com to retreive the password, so i'll try doing it without the ident then
Verstuurd vanaf mijn iPhone
Op 21 jun. 2014 om 00:38 heeft mgp25 notifications@github.com het volgende geschreven:
@xvilo Identity: A unique hash generated by your device. If using WART or the API, it is a SHA1 string generated using a combination of your mobile number and specified "password" as a salt.
When logging in you can do this: So $identity is not required.
$w = new WhatsProt($username, null, $nickname, $debug); The problem I see is that your password has not been generated by the server WhatsApp. Did you registered you number with the API or WART?
— Reply to this email directly or view it on GitHub.
i tried using null als identity, but still i get the not-authorized message....
tx <stream:features></stream:features>
tx <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="WAUTH-2" user="+316123456789"></auth>
rx <start from="s.whatsapp.net"></start>
rx <stream:features></stream:features>
rx <challenge>n??????!?;?&ಉ)</challenge>
tx <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">&Ÿ??o"????(?|?7??j??X??B?H?"</response>
rx <failure>
rx <not-authorized></not-authorized>
rx </failure>
Fatal error: Uncaught exception 'Exception' with message 'Login Failure' in /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php:1618
Stack trace:
#0 /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php(465): WhatsProt->doLogin()
#1 /Volumes/ORCHID/Users/xvilo/whatsapp/whatsapp_whatsapi_send.php(13): WhatsProt->loginWithPassword('aab0c39d826955f...')
#2 {main}
thrown in /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php on line 1618
from terminal
My code:
$userPhone = '+316123456789';
$userIdentity = null;
$userName = 'Pois0n';
$password = 'aab0c39d826955ff36845a558e01faffd10d1af4';
$debug = true;
@xvilo error. Dont put the phone number with '+'
Put it like this:
$userPhone = '316123456789';
Mhh... Still not working correctly... and what it returns doesnt make sense at all hahaha
tx <stream:features></stream:features>
tx <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="WAUTH-2" user="316123456789"></auth>
rx <start from="s.whatsapp.net"></start>
rx <stream:features></stream:features>
rx <challenge>???ߺ%:?`?? |?}?L</challenge>
tx <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">[,mکT?,????]??i??~Q?R?tx????</response>
rx <failure>
rx <not-authorized></not-authorized>
rx </failure>
Fatal error: Uncaught exception 'Exception' with message 'Login Failure' in /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php:1618
Stack trace:
#0 /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php(465): WhatsProt->doLogin()
#1 /Volumes/ORCHID/Users/xvilo/whatsapp/whatsapp_whatsapi_send.php(13): WhatsProt->loginWithPassword('aab0c39d826955f...')
#2 {main}
thrown in /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php on line 1618
@xvilo Your password is wrong or WhatsApp has blocked your number. Did you tried to register your number again? Try it using WART and try logging in with the new password.
Login Failure-> When not authorized means (the credentials arent right or blocked)
rx <failure>
rx <not-authorized></not-authorized>
rx </failure>
The number isn't blocked because i can use it on my other phone, i'll try to run WART on my mac hahaha
@xvilo If you are trying to use the same number with WhatsAPI and your mobile client, it wont work. If you logging in in your mobile device, the password you got from WART is useless, if you want to use it with WhatsAPI its fine, but once you use it in your mobile device, the password you got wont work and you will need to request a new one.
i do understand that! does this mean it worked:
Fatal error: Call to undefined method WhatsProt::Message() in /Volumes/ORCHID/Users/xvilo/whatsapp/whatsapp_whatsapi_send.php on line 14
But that de funtion name isn't good?
@xvilo there is a test folder in WhatsAPI, inside there is a file called whatsapp.php, you can use that to see the basic functions.
$w->sendMessage($dst, $msg);
Got it working! The password was the problem hahaha but then i use whatsapp.php i get this error message:
php whatsapp.php -s +3164******381 dit
[] Logging in as 'Sem' (1336******183)
tx <stream:features></stream:features>
tx <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="WAUTH-2" user="13******1183">???13363******83?62`???hا_??ͯ9U******2495WhatsApp/2.11.209 Android/4.3 Device/GalaxyS3 MccMnc/310001</auth>
rx <start from="s.whatsapp.net"></start>
rx <stream:features></stream:features>
rx <challenge>?~???I?Ҙ=&jT?c?</challenge>
tx <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">????X???p?w?JU??R??0??q???k`?</response>
rx <success t="1403612499" kind="free" status="active" creation="1403607347" expiration="1435143347">?
F?? ??????? ??</success>
rx <notification from="31****381-1401527083@g.us" id="249****569" participant="3*****381@s.whatsapp.net" retry="4" offline="4" type="subject" t="1402503830" notify="Sem ASdfkjwerj">
rx <body event="add">Mont Ventouxers!!!! </body>
rx </notification>
Fatal error: Uncaught exception 'Exception' with message 'Method subject not implemented' in /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php:2307
Stack trace:
#0 /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php(1841): WhatsProt->processInboundDataNode(Object(ProtocolNode), true)
#1 /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php(476): WhatsProt->processInboundData('??????=??????m?...', true)
#2 /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php(1612): WhatsProt->pollMessages()
#3 /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php(465): WhatsProt->doLogin()
#4 /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/tests/whatsapp.php(46): WhatsProt->loginWithPassword('81Ptcl1EZJBLxB8...')
#5 {main}
thrown in /Volumes/ORCHID/Users/xvilo/whatsapp/WhatsAPI/src/php/whatsprot.class.php on line 2307
@xvilo dont use the '+'. Can you post your script or are you using whatsapp.php?
MGP25 you are a hero! it was all so simple
how to change the status to solved?
@xvilo close issue.
Hi there, i follow the steps and can send any messages with 'test' but before a little time, the whatts appear block my connections:
[] Logging in as 'Karl' (55xxxxxxxx) tx stream:features/stream:features
tx
PHP Fatal error: Uncaught exception 'Exception' with message 'Login Failure' in /Projetos/Exemplos_net/whatsprot.class.php:1640 Stack trace:
thrown in /Projetos/Exemplos_net/whatsprot.class.php on line 1640
Anyone can help me ?
It seems you are blocked. Nothing to do
I think this too, after a more little time, the command sending again
Yes in general the blocks seems to be temporary, not sure if they blocks accounts permanently.
Hopefully never hahahahhaa
thx a lot !!
Hi all again, anyone know a method to configure the whatts in cel and in whatsAPI conf ?
Hi,
I'm quite new in to the whatsapi... but what should my userIdentity be?
The output is:
and my credentials are:
What did i do wrong :o
Thanks in advance,
//Sem