-1

I want to be able to create a chat room using rest webservices of Openfire.Like for creating user we have

http://example.com:9090/plugins/userService/userservice?type=add&secret=bigsecret&username=kafka&password=drowssap&name=franz&email=franz@kafka.com

but unable to find any tutorial to guid me. Is it possible? please help. I want this url way because my openfire server may be located at a different location than my application webservice.

Deb
  • 2,431
  • 3
  • 18
  • 28

1 Answers1

1

Yes you can also create Chat Rooms over HTTP/REST.

Therefore you need the MUC Service Plugin. You can find it here: http://www.igniterealtime.org/projects/openfire/plugins.jsp

Here is a full documentation how to create and configure the chat rooms: https://www.igniterealtime.org/projects/openfire/plugins/mucservice/readme.html

Simple example:

Header: Authorization: Basic YWRtaW46MTIzNDU=

Header: Content-Type: application/xml

POST http://example.org:9090/plugins/mucservice/chatrooms

Payload Example 1 (required parameters):

<chatRoom>
    <naturalName>global-1</naturalName>
    <roomName>global</roomName>
    <description>Global Chat Room</description>
</chatRoom>
Roman S.
  • 1,206
  • 15
  • 24