User Service插件添加之后需在openfire的admin管理中开启:服务器-》服务器设置-》User Service enabled并设置secretkey,重启插件。
在浏览器中输入:
http://yourip:9090/plugins/userService/userservice?type=add&secret=yoursecret&username=600&password=600&name=600&email=600@openfire.com
加载页面出现:
<result>ok</result>
表示用户添加成功。
在终端下输入:
curl --data "type=add&secret=yoursecret&username=600&password=600&name=600&email=600@openfire.com" http://yourip:9090/plugins/userService/userservice
同样可以添加用户。
另附php中添加用户方法:

本文介绍如何通过UserService插件在Openfire服务器上添加用户。包括在管理界面启用插件、设置secret key及重启插件的方法。同时提供通过HTTP请求和curl命令行工具添加用户的示例,并给出PHP实现方式的链接。
2292

被折叠的 条评论
为什么被折叠?



