joaoricardo000 / whatsapp-bot-seed

A small python framework to create a whatsapp bot, with regex-callback message routing.
728 stars 244 forks source link

auth error trying to connect #13

Closed gustavo-iniguez-goya closed 8 years ago

gustavo-iniguez-goya commented 8 years ago

Hi,

I've registered a new phone number using yowsup, but when I launch the server with the received credentials I get an Auth Error message:

_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Initializing stack
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Constructed Network Layer
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Constructed Stanza Regulator Layer
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Constructed Crypt Layer
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Constructed Coder Layer
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Constructed Logger Layer
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Constructed Axolotl Layer
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,688] Constructed Authentication Layer - Messages Layer - Receipt Layer - Ack Layer - Presence Layer - Ib Layer - Iq Layer - notification Ib Layer - Iq Layer - Chatstate Layer - call Layer - Groups Iq Layer - Media Layer - Privacy Layer - Profiles Layer
_yowstack.py_   [DEBUG][2015-12-06 19:32:49,689] Constructed Interface Layer - Interface Layer
_layer.py_  [DEBUG][2015-12-06 19:32:49,689] Connecting to e8.whatsapp.net:443
_server.py_ [INFO][2015-12-06 19:32:49,801] ##################################################
_server.py_ [INFO][2015-12-06 19:32:49,801]     Server started. Phone number: xxxxxxxxxxx
_server.py_ [INFO][2015-12-06 19:32:49,802] ##################################################
_layer.py_  [DEBUG][2015-12-06 19:32:50,061] tx:
<stream:features>
<readreceipts>
</readreceipts>
<groups_v2>
</groups_v2>
<privacy>
</privacy>
<presence>
</presence>
</stream:features>

_layer.py_  [DEBUG][2015-12-06 19:32:50,066] tx:
<auth passive="false" user="34686617206" mechanism="WAUTH-2">
(code snipped)
</auth>

_layer.py_  [DEBUG][2015-12-06 19:32:50,454] rx:
<stream:features>
</stream:features>

_layer.py_  [DEBUG][2015-12-06 19:32:50,454] rx:
<challenge>
(code snipped)
</challenge>

_layer.py_  [DEBUG][2015-12-06 19:32:50,460] tx:
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
(code snipped)
</response>

_layer.py_  [DEBUG][2015-12-06 19:32:52,675] rx:
<failure>
<not-authorized>
</not-authorized>
</failure>

_layer.py_  [DEBUG][2015-12-06 19:32:52,675] Disconnected, reason: Authentication Failure
_server.py_ [ERROR][2015-12-06 19:32:52,675] Authentication Error: not-authorized

The yowsup-cli script works fine, I can send messages with the same credentials, do you know what can be wrong?

Thank you in advance.

gustavo-iniguez-goya commented 8 years ago

Sorry, I hadn't installed yowsup on the system, so copying the yowsup sources to the bot src/ dir did the trick O:)