2
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?

我使用邮递员向 ejabberd 注册 api 发出 HTTP 请求。ejabberd 已设置并且管理员在 url - http://localhost:5280/admin上正常运行。

http请求的Url是 - http://localhost:5280/api/register

正文 - {“用户”:“鲍勃”,“主机”:“example.com”,“密码”:“SomEPass44”}

标头 - [{"key":"Content-Type","value":"application/json","description":""}]

响应 - { "status": "error", "code": 32, "message": "AccessRules: Account 无权执行该操作。" }

我搜索了很多并发现它需要对 ejabberd.yml 文件进行一些更改。我的 yml 文件可在附加的链接上找到。

此链接包含 YML 文件

任何帮助都会很棒。

4

1 回答 1

2

在配置文件 /opt/ejabberd/conf/ejabberd.yml

查找 api_permissions 更改公共命令 who 和 what 的值。将您的代码与下面提到的进行比较。

看到这个帖子:

http://www.centerofcode.com/configure-ejabberd-api-permissions-solve-account-not-right-perform-operation-issue/

于 2018-06-01T16:59:08.840 回答