What version of ejabberd are you using?17.04
What operating system (version) are you using?ubuntu 16.04
How did you install ejabberd (source, package, distribution)?
package
What did not work as expected? Are there error messages in the log? What
was the unexpected behavior? What was the expected result?我使用postman向ejabberd register api发出HTTP请求。ejabberd设置完成,管理员在url - http://localhost:5280/admin上正常运行。
http请求Url为- http://localhost:5280/api/register
Body -{ "user":"bob","host":"example.com","password":"SomEPass44“}
Header - {"key":"Content-Type","value":"application/json","description":""}
响应-{ "status":"error","code":32,"message":"AccessRules:账号无权执行此操作。“}
我搜索了很多,发现它需要在ejabberd.yml文件中做一些修改。我的yml文件可以在所附的链接上找到。
任何帮助都会很好。
发布于 2018-06-02 00:59:09
在配置文件/opt/ejabberd/conf/ejabberd.yml中
查找api_permissions更改公共命令的值谁和什么。将您的代码与下面提到的代码进行比较。
请看这篇文章:
http://www.centerofcode.com/configure-ejabberd-api-permissions-solve-account-not-right-perform-operation-issue/
https://stackoverflow.com/questions/48112259
复制相似问题