Search code examples
xmppejabberdadministrationejabberd-module

How to call ejabberd Administrator API


I have recently installed ejabberd and configured it successfully. I have been requested to call the Administrator API of ejabberd for some back-end processing. I have found the guide for the same on https://docs.ejabberd.im/admin/api/

I have read the document multiple times but still not able to understood what configuration it will require in order to work.

I have have added listen port configuration in /etc/ejabberd/ejabberd.yml

- 
  port: 4560
  module: ejabberd_xmlrpc

When a POST request is made on this port I am getting "unsupported media type" in the HTTP response.

Do I need to install any other modules? I am not sure about https://github.com/jadahl/mod_restful


Solution

  • You should start reading about ejabberd API configuration instead of directly jumping into APIs. Below link provide details about that.

    https://docs.ejabberd.im/developer/ejabberd-api/

    As document is saying, XML-RPC API is deprecated , so you better start using Rest API.

    Below link will help you on how to start configuring ejabberd server.

    https://docs.ejabberd.im/developer/ejabberd-api/simple-configuration/

    You don't need any other module to use ejabberd APIs.