Upon registration attempt, server sends a message containing a token, which should later be passed in messages during the conversation. Something like
{
"from" : "jid@server",
"to" : "jid@client",
"type" : "token",
"token" : "T0K3N"
}
I tried the simple client connection sequence:
c = xmpp.Client('myClient')
c.connect(server=(localhost, 5222))
c.auth('jid', 'password')
And connection establishes successfully. However, I'm not getting token from server. How can I listen and consume the reply?
Edit: I see that server tries to send the token, but fails with "cannot relay to offline receiver" message. Do I connect incorrectly?