我在 Windows 10 (localhost) 上使用 ejabberd-18.01。我正在尝试使用 web 方法通过Postman连接到 ejabberd:
POST:本地主机:5280/api/specific_api_method
根据官方 API 文档(https://docs.ejabberd.im/developer/ejabberd-api/admin-api/),我正在尝试使用 POST 方法添加一个名册项目,正文如下:
POST:本地主机:5280/api/add_rosteritem
{
"localuser": "user1",
"localserver": "mydomain",
"user": "admin",
"server": "mydomain",
"nick": "u1",
"group": "Friends",
"subs": "both"
}
我收到一个错误:
{
"status": "error",
"code": 32,
"message": "AccessRules: Account does not have the right to perform the operation."
}
如果有人可以指导我如何验证自己并使用 Web API 将新用户或名册项目添加到 ejabberd,我将不胜感激。谢谢。