I'm trying to send a Google Hangout message using sendxmpp from the shell on a linux machine. For this i've installed the latest sendxmpp (1.24).
Everything looks good, except the authentication fails. This is the command that i use:
echo "GTalk Test" | sendxmpp -v -t receiver.username
And this is the output:
sendxmpp: config: 'password' => '[sender.pass]'
sendxmpp: config: 'component' => 'gmail.com'
sendxmpp: config: 'jserver' => 'talk.google.com'
sendxmpp: config: 'username' => '[sender.username]'
sendxmpp: ssl_verify: 1
sendxmpp: tls_ca_path:
sendxmpp: Connect: 1
Use of uninitialized value in string eq at /usr/bin/sendxmpp line 518.
Error 'AuthSend': [?]
sendxmpp: Disconnect
I've copy pasted the username and password into the gmail-login screen to make sure there are no typos.
I've also turned on the 'less secure apps' settings (https://www.google.com/settings/security/lesssecureapps)
Furthermore, on this page: https://security.google.com/settings/security/activity?pli=1&p gmail told me an unknown device has tried to log in and prevented it from doing so. I've told it it was me so it doesn't have to worry about it and since i did that, no other attempts appear anymore on that screen.
I've also manually send messages (successfully) from and to both accounts to make sure it isn't blocked on that level.
When i switch on debugging (-d) , this is the (last part of the) output:
XMPP::Conn: AuthSASL: shiney new auth
XML::Stream: Send: (<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>[hash]</auth>)
XMPP::Conn: AuthSASL: haven't authed yet... let's wait.
XMPP::Conn: Process: timeout(1)
XML::Stream: Read: buff(<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>)
XML::Stream: Read: buff(</stream:stream>)
XML::Stream: Read: buff()
XML::Stream: Read: ERROR
Use of uninitialized value in string eq at /usr/bin/sendxmpp line 518.
Error 'AuthSend': [?]
XML::Stream: Send: (</stream:stream>)
XML::Stream: SetCallBacks: tag(node) func(CODE(0x29855b8))
XMPP::Conn: Disconnect: bye bye
sendxmpp: Disconnect
I've also tried to add @gmail.com to my username (just to try), but that also results in a failure (although a slightly different one: <invalid-authzid/>
)
So, i know it successfully connects, i know it's using the right account, but still i get authentication failures. What else can i try?
In the end, what solved it was setting a new password :S Maybe this is simply what is needed after changing all those other security settings?