I am trying to create a instant chat room using Smack but the server returns me an IQ packet with an error code 401 and type="AUTH" and a message packet with a message that the room is locked from entry until configuration is confirmed
final MultiUserChat muc = new MultiUserChat(connection, chatName+"@conference.123");
try {
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
muc.create(chatName);
} catch (XMPPException e) {
Log.e("Exception", e.getMessage());
}
This gives an exception (not-authorized(401)). Following are the two packets received from server:
<iq id="J1O5y-5" to="akshay@123/Smack" from="[email protected]" type="error"><error code="401" type="AUTH"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
and
<message to="akshay@123/Smack" from="[email protected]" type="groupchat"><body>This room is locked from entry until configuration is confirmed.</body></message>
So are there any changes in server configuration that I need to make or is there any problem in code ?