xmpp_message inbound service enabled, an app
can receive XMPP messages sent by users and clients of XMPP chat services,
such as Google Talk. Incoming messages are routed to the application in
the form of HTTP requests to a specified URL. This is similar to how an
app can receive email.
An app can receive two kinds of XMPP messages: “chat” and “normal.” Chat messages are sent by user-operated instant messaging clients, and usually represent a conversation. Normal messages are general purpose messages, which you might use for custom clients. Notice that this means an app cannot be a participant in a group chat.
An app receives XMPP messages at several addresses. Messages sent to addresses of these forms are routed to the default version of the app:
Messages sent to addresses of this form are routed to the specified version of the app, useful for testing:
Each message is delivered to the app as an HTTP POST request to the following URL path:
(Unlike incoming email, the sender JID is not included in the URL path.)
The body content of the HTTP POST request is a MIME multipart message, with a part for each field of the message:
The sender’s JID.
The app JID to which this message was sent.
The message body content (with characters as they were originally typed).
The full XML stanza of the message, including the previous fields ...