REST API create chat room cant add users

the request i make is

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>




it creates the room but there are no users in it…am i missing something?

What do you expect if you call your XML above?

The members contains the bareJID of the users with member affiliation. If the room is not members-only then the list will contain the users that registered with the room and therefore they may have reserved a nickname.

thank you for the reply!

hmmm when i go to user permissions form i do see my room members.

maybe theres something basic im missing here…i thought the members are the occupants and i didnt understand why there are no occupants…

is there a way to put occupants in the chat room as i create it? (as admin)

Members are not occupants. The occupants have the “member” permission/affiliation. You can not create occupants in the chat room.

**Member: **A user who is on the “whitelist” for a members-only room or who is registered with an open room. A member has an affiliation of “member”.

**Occupant: **Any user who is in a room.

Look here:

ok great that cleared some things up for me, i appreciate the support !


I’m bit late to this, but… Is there a way to add occupants to a chat room programatically?

1 Like


That is also my challenge now.

I use the REST plugin and want to control all via the REST service

  • I create a user

  • create a chat room

  • add a user to a room as described here

The create user and create room work perfectly, the add user to room does give back a 201 CREATED but nothing seems to have happened…


@Hugo if you select the channel in Openfire Admin interface and go to “User permissions” you don’t see the User there?

And please take a look at: using-openfire-rest-api

solved, indeed I had not yet fully understood the flow…

Hi Hugo,

I had the same misunderstanding as you. I thought you could add an occupant to a chat room using the REST API. However, this is not possible. The only way to do that is using the smack API.