如何使用Python REST API在openfire中创建聊天室并将用户添加到聊天室中

问题描述 投票:0回答:1

我正在使用此模块https://github.com/seamus-45/openfire-restapi/blob/master/ofrestapi/muc.py

我写了main.py import muc.py

from ofrestapi.muc import Muc
m = Muc(host = 'http://desktop-oam4s7o:9090', secret = 'poYixzhOJsPmB4tB')
m.add_room(roomname = 'test', name = 'test', description = 'test')

但是失败了,我遇到了一个例外:

ofrestapi.exception.InvalidResponseException:500

有人可以使用一些用于MUC服务的Python示例来创建聊天室并将用户添加到聊天室吗?

预先感谢!

python rest api xmpp openfire
1个回答
0
投票

请参阅github中的以下示例代码可能会帮助您,这是Openfire RestAPI的命令行界面:https://github.com/seamus-45/openfire-cli

© www.soinside.com 2019 - 2024. All rights reserved.