XMPP Gateway provides a HTTP interface to talking to an XMPP server. It is designed to speed up and simplify communications between a web app and a generic XMPP server. It achieves this by taking care of the XMPP connection management, and allowing the sending and receiving of replies via a very simple synchronous HTTP interface.

HTTP Basic Authentication is used to provide the credentials for authenticating an XMPP session. An XMPP stanza can then be sent by making a HTTP Post (see 'Operation' below).

There are 3 stanza types in XMPP: IQ, message and presence. IQ always expects a reply, and this will be returned in the body of the HTTP response. Message and presence are purely fire and forget.

Currently it is not production ready and merely a proof of concept.


  • ruby 1.9.2


To install the gems

$ gem install xmpp_gateway

To start the server

$ xmpp_gateway --debug

Server should now be available on

To send a message:

$ curl --user [email protected]:PASSWORD --data "stanza=<message to='[email protected]'><body>Howdy</body></message>"

To send an IQ:

$ curl --user [email protected]:PASSWORD -d "stanza=<iq to=''><query xmlns=''/></iq>"
<iq type="result" id="blather0007" from="" to="[email protected]/457fd1b2e49ebb39">
  <query xmlns="">
    <identity category="server" type="im" name="Isode M-Link 14.6a6"/>
    <identity category="pubsub" type="pep"/>
    <feature var=""/>
    <feature var=""/>
    <feature var="urn:xmpp:ping"/>
    <feature var="vcard-temp"/>
    <feature var=""/>
    <feature var=""/>
    <feature var="jabber:iq:auth"/>
    <feature var="jabber:iq:private"/>
    <feature var="jabber:iq:version"/>
    <feature var=""/>
    <feature var=""/>
    <feature var=""/>
    <feature var=""/>
    <feature var=""/>
    <feature var=""/>
    <feature var=""/>
    <feature var=""/>


  • Test suite
  • Add HTTP callbacks so that asynchronous events can be fed back to the HTTP server
  • HTTPS support