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寄存器api发出HTTP请求。设置了ejabberd并且管理员在网址上正常运行 - http://localhost:5280/admin。
http请求的网址是 - http://localhost:5280/api/register
身体 - { "用户":" bob", "主持人":" example.com", "密码":" SomEPass44" }
标题 - [{" key":" Content-Type"," value":" application / json",&#34 ;描述":""}]
回应 - { "状态":"错误", "代码":32, " message":" AccessRules:帐户无权执行操作。" }
我经常搜索并发现它需要在ejabberd.yml文件中进行一些更改。我的yml文件可以在附带的链接上找到。
任何帮助都会很棒。
答案 0 :(得分:2)
在配置文件/opt/ejabberd/conf/ejabberd.yml
中查找api_permissions 更改公共命令的值和谁。比较下面提到的代码。
看到这篇文章: