powered by Jive Software

How do anonymous logins work?

I am new to the whole XMPP world, and am trying to get up to speed. I noticed that Jive Messenger supports some type of ‘‘anonymous logins.’’ How exactly does this work? I have been unable to find much information on this, and I realize that this is outside of the XMPP spec. If I were to build some type of ‘‘customer service’’ type application, this type of feature would be extremely valuable.


The anonymous login that Messenger currently supports can be used by sending a blank authentication packet. If you’'re using the Smack library to write your client, there is a loginAnonymously method you can use.

The XML is:

And then your JID will be something like:


(resource is a unique identifier). If you have any problems making this work, let us know.

Also, I apologize in advance for the plug, but if you’‘re looking at using XMPP for customer service than I’'d recommend looking at our commercial XMPP product, Jive Live Assistant – http://www.jivesoftware.com/products/liveassistant/



Awesome, exactly the information I was looking for. Currently I have no plans for building a ‘‘customer service’’ application, it was really just the quickest example I could come up with for the use case But I did look into your project and it looks quite nice, it will definitly be bookmarked incase the need ever arises.

Thanks again.

  • Daniel


Sounds good. BTW, I should also mention that the “real” way to do anonymous logins is through SASL. The older Jabber protocol used a different authentication mechanism, which is what is supported by Jive Messenger (documented as JEP-0078). We plan to support SASL, including anonymous SASL in an upcoming release.




I try to use anonymous login together with XIFF, but is seems JiveMessenger get stuck once it received the as indicated in the previous message. Any idea?

here is the log from Flash traces:

SENT: <?xml version="1.0"?><flash:stream to=“proto.org” xmlns=“jabber:client” xmlns:flash=“http://www.jabber.com/streams/flash” version=“1.0”>

RECEIVED: <?xml version=''1.0'' encoding=''UTF-8''?><flash:stream xmlns:flash=“http://www.jabber.com/streams/flash” xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client” from=“proto.org” id=“94eb7dec” xml:lang=“en” />



Hey johann,

I think that you have hit a reported error. Could you check the error.log and paste any exception you have? I added more debugging information to the latest Messenger version so it will be of help if you can install the latest nightly build and run again your application. If you are still having the problem you will see more debugging information on the logs. Please, paste the errors that you have in the logs.


– Gato


Thanks for your quick answer! You’'re right, I m get something in the error.log (I m using 2.1.2 for the moment)

2005.03.25 09:26:08 org.jivesoftware.messenger.handler.IQAuthHandler.handleIQ(IQAuthHandler.java:144 ) Error handling authentication IQ packet

java.lang.IllegalArgumentException: Adding text to an XML document must not be null

at org.dom4j.DocumentFactory.createText(DocumentFactory.java:150)

at org.dom4j.tree.AbstractElement.addText(AbstractElement.java:1271)

at org.dom4j.tree.AbstractElement.setText(AbstractElement.java:1566)

at org.jivesoftware.messenger.handler.IQAuthHandler.handleIQ(IQAuthHandler.java:91 )

at org.jivesoftware.messenger.handler.IQHandler.process(IQHandler.java:48)

at org.jivesoftware.messenger.IQRouter.handle(IQRouter.java:195)

at org.jivesoftware.messenger.IQRouter.route(IQRouter.java:74)

at org.jivesoftware.messenger.PacketRouter.route(PacketRouter.java:65)

at org.jivesoftware.messenger.net.SocketReadThread.readStream(SocketReadThread.jav a:254)

at org.jivesoftware.messenger.net.SocketReadThread.run(SocketReadThread.java:110)

Any workaround?

Thanks !


Hey Johann,

Thanks for the stack trace. The problem is that the XIFF library shouldn’‘t be sending an empty jabber:iq:auth get packet if you are going to use an anonymous user. Anyway, I will try to make Messenger’'s code more error-safe under these circumstances.


– Gato


Actually I modified the XIFF Lib to send an empty auth packet, as it was suggesed above in this thread… but may be this is not the most up to date way to go. So, what is the best way to login anonymously in Jive Messenger?



Actually I modified the XIFF Lib to send an empty

auth packet, as it was suggesed above in this


I understand the confusion now. The IQ packet that you are sending should be of type SET instead of GET. If you look at Smack’'s code you will see that Smack is using SET.

So, what is the best way to login

anonymously in Jive Messenger?

I checked in code that makes the server more resistant if the GET packet does not include any field element. So if your code was sending a GET and then a SET packet you can leave it as it is (if you use tomorrow’'s nightly build) or you may remove the GET packet and just send a SET packet which may also be more compliant and may work with other servers too.


– Gato