Need help on oauth & mod_restful

Hi,

I have done configuration on ejabberd.yml but don't seem to be able to get the oauth token and mod_rest to work. Here is my below setup.

listen:

port: 5281
module: ejabberd_http
tls: true
certfile: /path/to/my/file.pem
request_handlers:
   "/oauth": ejabberd_oauth
   "/api": mod_http_api

port: 5285
module: ejabberd_http
request_handlers:
   "/rest": mod_rest

port: 8088
ip: "127.0.0.1"
module: ejabberd_http
request_handlers:
   "/api": mod_restful

authentication:
auth_method: internal
auth_password_format: scram
auth_method: sql

acl:
   restuser:
      user:
        user1
        user2
access:
   restaccess:
      restuser: allow
   commands_admin_access: restaccess
   commands:
      - register
      - unregister
   commands_admin_access: configure
   commands:
      - add_commands: [user, admin, open]
   auth_expire: 31536000
   oauth_access: all

modules:

mod_rest:
   allowed_ips:
      - here i allow localhost ip
      - also allow my external ip
   allowed_destinations:
      - user1
      - user2
   allowed_stanza_types:
      - "message"
      - "presence"
      - "iq"
   access_commands:
      restaccess:
         - registered_users
         - connected_users

Question beside than above, do i miss out specify module "mod_restful"? I did setup, stop and start back ejabberd all looks ok but when i try to work on something or say i access admin panel, error appear on log says "mod_restful does not export opt/type1, that kind of error. I comment out the mod_restful and the error does not appear again.

Based on this is the configuration above correct or i have miss out something? When i type url as https://mydomain.com:5281/api/ I get error as {"status":"error","code":40,"message":"Missing command name."}

When i type https://mydomain.com:5281/oauth/ I get error display at 404 not found.

When i type http://mydomain.com:5285/rest/ I get a message says "Try POSTing a stanza". This looks ok but is it i have to do?

Anyone can help me? Thanks.

Syndicate content