Can I create custom REST API on ejabberd?

98 views Asked by At

I want to send data to ejabberd server using my own custom REST API. Just like ejabberd REST APIs /api/send_message. Is it possible? Or can I call my custom module directly with using hooks?

1

There are 1 answers

0
Badlop On BEST ANSWER

send_message is implemented in mod_admin_extra.erl

You can:

A) Edit the source code of that command, so your custom send_message code will do what you want.

B) Or copy the code of that command in that file, and add a new command called send_message_faaiq in that file that will do what you want.

C) Or you can create your own module, mod_faaiq.erl, copy that code, and change it to suit your needs.