I'm trying to make some test with this nice library.
I have made successfully tests with yowsup-cli but now I'd like to create a small python script to manage in a smart ways events (with listener/callback).
I'm trying the code explained here https://github.com/tgalal/yowsup/wiki/Yowsup-Library-Documentation:
print "Logged in with %s" % s
# make a call to method ready to be able to receive messages
y = YowsupConnectionManager()
signalsInterface = y.getSignalsInterface()
methodsInterface = y.getMethodsInterface()
methodsInterface.call("auth_login", ("username", "password"))
Just incase someone has the same problem that authentication isn't working though you're passing the right username and password as argument, You have to base 64 encode the password like is done in the Command Line client.
You have to get the password by registering using Yowsup or WART OR from your phone ( https://github.com/tgalal/yowsup/issues/234 ? )
import base 64 password= 'randomletters+somenumbers=' #Get this by registering password = base64.b64decode(bytes(rawPass.encode('utf-8')))
This is not obvious and i forget often and might be what's going wrong.