Cannot add member to a chat room (REST API)

openfire 4.0.2

I am using the REST API Client to add a user to a room.

Looking at the debug information it seems to return success 201. However, the user is not added to the chat room.

1 > POST http://10.10.20.160:9090/plugins/restapi/v1/chatrooms/coffeeroom/members/steve@localhost.localdomain
1 > Authorization: Basic YWRtaW46Zm9ydW0xOA==
1 > Content-Type: application/xml Apr 06, 2016 12:31:51 AM org.glassfish.jersey.filter.LoggingFilter log
INFO: 1 * Client response received on thread http-nio-8080-exec-2
1 < 201
1 < Access-Control-Allow-Credentials: true
1 < Access-Control-Allow-Headers: origin, content-type, accept, authorization
1 < Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
1 < Access-Control-Allow-Origin: *
1 < Content-Length: 0
1 < Date: Tue, 05 Apr 2016 17:31:51 GMT
1 < Expires: Thu, 01 Jan 1970 00:00:00 GMT
1 < Set-Cookie: JSESSIONID=153sgnfp1oi1x16rjo68kvbwz8;Path=/;HttpOnly
1 < X-Frame-Options: deny

I have successfully created new group chat rooms using the REST API, but can’t add any users into them. Using this code.

mRestXmppClient.getRestApiClient().addMember(roomName, username);

Just wondering for this to work do I need to add any particular setting for the users, rooms, roles to add a user into a chat room?

Many thanks for any suggestions,

Message was edited by: wroot

1 Like

Under Permissions (Room Affiliations)

I have added steve@localhost.localdomain to the members of this room.

Screenshot from 2016-04-26 11:17:38.png

However, I am still not able to add a member to the group chat room. Am I missing something here? I am wondering if there is any settings that I need to modify for the room to get this to work. These are the properties of the room I am trying to add a member to.

Any extra help would be grateful.

I have the same issue…

hugo