install mod_restful

Hi every body. I want to install mod_restful on ejabberd 15.06 but I get this error

root@debian:~# /opt/ejabberd-15.06/bin/ejabberdctl module_check mod_restful

src/mod_restful_admin.erl:63: Warning: behaviour gen_restful_api undefined
src/mod_restful_mochijson2.erl:585: can't find include lib "eunit/include/eunit.hrl"
src/mod_restful_mochinum.erl:269: can't find include lib "eunit/include/eunit.hrl"
src/mod_restful_register.erl:32: Warning: behaviour gen_restful_api undefined
Error: {compilation_failed,"src/mod_restful_mochijson2.erl"}

how do that? what is problem? I want to add below config in ejabberd.yml
but when added it, I cant run ejabberd

listen:
...
-
port: 8088
module: ejabberd_http
request_handlers:
"/api": mod_restful

modules:
...
mod_restful:
api:
- path: ["admin"]
module: mod_restful_admin
params:
key: "secret"
allowed_commands: [register, unregister]
- path: ["register"]
module: mod_restful_register
params:
key: "secret"

It will not help you

It will not help you regarding mod_restful, but ejabberd 15.09 includes a REsT module with OAuth support: `mod_http_api`.

You can read more from ejabberd documentation: https://docs.ejabberd.im/admin/guide/oauth/

so useful and thankyou

so useful and thankyou

Syndicate content