I am trying to hit the endpoint /register on my ejabberd server
i am getting the following error -
{ status: 'error',
code: 10,
message: 'You are not authorized to call this command.' }
The api_permissions section is as follows
api_permissions:
"console commands":
from:
- ejabberd_ctl
- mod_http_api
who: all
what: "*"
"admin access":
who:
- access:
- allow:
- ip: "127.0.0.1/8"
- acl: admin
- oauth:
- scope: "ejabberd:admin"
- access:
- allow:
- ip: "127.0.0.1/8"
- acl: admin
what:
- "*"
- "!stop"
- "!start"
"public commands":
who: all
what:
- "status"
- "connected_users_number"
I am sending username and password in the auth request part of my header. The username is registered under the acl part of my ejabberd.yml file like so
admin:
user:
- "testuser@internal_ip_address"
N:B: I am sending the post request to http://127.0.0.1:5280/api/register from a nodejs script. I am getting the 'status connected' when i hit the .../api/status endpoint.
i have tried twicking my ejabberd.yml file and i still get that error. not sure how to give my user the right permissions to access the endpoint