Hello guys I am using ejabberd and I want to generate a bearer token to access all the methods and to get the data using the REST of ejabberd. When I try to generate the bearer token with no auth in header it shows an error which is
i am using the port which is 5180 for the ejabberd_http module my configuration is
port: 5180
ip: "::"
module: ejabberd_http
request_handlers:
/admin: ejabberd_web_admin
/api: mod_http_api
/xmlrpc: ejabberd_xmlrpc
/oauth": ejabberd_oauth
and the configurations of api permission is
oauth_access:
- allow:
- user:
- "admin@localhost" # add your user name
oauth_expire: 86400
acl:
local:
user_regexp: ""
loopback:
ip:
- 127.0.0.0/8
- ::1/128
- ::FFFF:127.0.0.1/128
- ::FFFF:43.250.158.125/16
admin:
user:
- "admin@localhost"
ip:
- "::"
- ::FFFF:43.250.158.125/16
api_permissions:
"some XMLRPC commands":
from: ejabberd_xmlrpc
who:
- ip: 127.0.0.1
- user: admin@localhost
what:
- "*"
# - registered_users
# - register
# - connected_users_number
# - change_password
# - check_password_hash
"admin access":
who:
ip: 127.0.0.1/8
oauth:
scope: "ejabberd:admin"
access:
allow:
acl: loopback
acl: admin
what:
- "*"
"console commands":
from:
- ejabberd_ctl
who: all
what: "*"
"loopback access":
who:
- ip: "::"
what:
- "*"
"public commands":
who:
ip: 127.0.0.1/8
what:
- "*"
access_rules:
register:
allow: all
# configure:
# - allow: all
local:
# allow
allow: all
c2s:
# deny: blocked
allow: all
announce:
allow: all
configure:
allow: all
muc_create:
allow: all
pubsub_createnode:
allow: local
trusted_network:
allow: all
i want to send the message to user using the rest but for this i need bearer token , when i try to generate bearer token is shows error plese suggest me some way to fix this issue and to generate the bearer token
thanks