How to extend Ejabberd API ?

Hello,

For a project of mine, I need to develop an instant messaging application and I chose to use Ejabberd as a server.
I need to store personal information about my users which means I need to build a web service to access this data.

My problem is that I'm not sure about how to do it :

- My first idea was to try to extend the commands used by mod_http_api but I'm new to erlang and the source code is tough to understand.

- Another idea was to develop another module similar to mod_http_api but with custom api requests.

- Finally I could build more easily web services outside ejabberd but that would mean to run another server on top of ejabberd.

If someone would be kind enough to help me, I would be very grateful.

Thanks in advance !

mod_http_api is a frontend to

mod_http_api is a frontend to call ejabberd commands. Other frontends are ejabberd_xmlrpc, ejabberdctl...

I imagine what you want is to add some commands to perform administrative stuff that the current commands can not do.

First of all, enable mod_admin_extra and mod_muc_admin, and check if maybe they provide the commands you want already.

If not, then you can write your custom commands, in mod_admin_extra or in your own module. For that, look at some command that does something similar to what you want, and modify it to suit your needs, or copy and adapt the code.

Hi, Thanks for your reply, I

Hi,

Thanks for your reply, I already enabled mod_admin_extra and mod_muc_admin so I will try to add some commmands in mod_admin_extra and see what happens.

Syndicate content