[ejabberd] mod_rest

Ricky Gutierrez xserverlinux at gmail.com
Tue Aug 22 06:02:45 MSK 2017


Hi, I am building an application in php and mysql and I want to
connect it with my ejabberd server 17.08 to send a direct message to
my users, I am using this module but when I make the connection with
wget it gives me some errors:

wget http://localhost:5285/rest/ --server-response --post-data
'<message to=“myuser at localhost" from="localhost/rest"><body>hola aqui
estoy</body></message>'


2017-08-21 20:46:59.425 [info] <0.344.0>@ejabberd_listener:accept:302
(<0.537.0>) Accepted connection 127.0.0.1:39508 -> 127.0.0.1:5285
2017-08-21 20:46:59.425 [info] <0.537.0>@ejabberd_http:init:149
started: {gen_tcp,#Port<0.22872>}
2017-08-21 20:46:59.426 [error] <0.537.0> CRASH REPORT Process
<0.537.0> with 0 neighbours crashed with reason:
{module_must_be_started_in_vhost,mod_rest,<<"localhost">>} in
mod_rest:try_get_option/3 line 114
2017-08-21 20:47:02.426 [info] <0.344.0>@ejabberd_listener:accept:302
(<0.538.0>) Accepted connection 127.0.0.1:39510 -> 127.0.0.1:5285

I show the configuration I'm using

my config:

 -

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



mod_rest:
    allowed_ips:
      - "127.0.0.1"
    allowed_stanza_types:
      - "message"
      - "presence"
      - "iq"


any idea list?


-- 
rickygm

http://gnuforever.homelinux.com


More information about the ejabberd mailing list