<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
<header>
  <title>Out of Band Data</title>
  <abstract>This specification defines two XMPP protocol extensions for communicating URIs, one for use in XMPP message stanzas and the other for use in a structured request-response interaction via XMPP IQ stanzas. Among other things, this enables one entity to inform another entity about a file that is available at an HTTP URL.</abstract>
  
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
  <number>0066</number>
  <status>Draft</status>
  <type>Standards Track</type>
  <sig>Standards</sig>
  <approver>Council</approver>
  <dependencies>
    <spec>XMPP Core</spec>
  </dependencies>
  <supersedes/>
  <supersededby/>
  <shortname>oob</shortname>
  <schemaloc>
    <ns>jabber:iq:oob</ns>
    <url>http://www.xmpp.org/schemas/iq-oob.xsd</url>
  </schemaloc>
  <schemaloc>
    <ns>jabber:x:oob</ns>
    <url>http://www.xmpp.org/schemas/x-oob.xsd</url>
  </schemaloc>
  
  <author>
    <firstname>Peter</firstname>
    <surname>Saint-Andre</surname>
    <email>stpeter@stpeter.im</email>
    <jid>stpeter@jabber.org</jid>
    <uri>https://stpeter.im/</uri>
  </author>

  <revision>
    <version>1.6</version>
    <date>2026-07-08</date>
    <initials>dwd</initials>
    <remark><p>Twenty years later, strike section 6's SI suggestion</p></remark>
  </revision>
  <revision>
    <version>1.5</version>
    <date>2006-08-16</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, converted to Standards Track.</p></remark>
  </revision>
  <revision>
    <version>1.4</version>
    <date>2006-01-11</date>
    <initials>psa</initials>
    <remark><p>Removed example of including URL in presence stanza.</p></remark>
  </revision>
  <revision>
    <version>1.3</version>
    <date>2004-10-18</date>
    <initials>psa</initials>
    <remark><p>Added non-normative section on integration with stream initiation (XEP-0095); added optional sid attribute to jabber:iq:oob schema.</p></remark>
  </revision>
  <revision>
    <version>1.2</version>
    <date>2004-04-13</date>
    <initials>psa</initials>
    <remark><p>Clarified that IQ use is for basic file transfer whereas message and presence use is for communication of URIs; added presence example; added references to file transfer specifications as well as related open issue.</p></remark>
  </revision>
  <revision>
    <version>1.1</version>
    <date>2004-02-10</date>
    <initials>psa</initials>
    <remark><p>Editorial adjustments and clarifications; added references to relevant RFCs.</p></remark>
  </revision>
  <revision>
    <version>1.0</version>
    <date>2003-10-08</date>
    <initials>psa</initials>
    <remark><p>Per a vote of the Jabber Council, changed status to Active.</p></remark>
  </revision>
  <revision>
    <version>0.3</version>
    <date>2003-06-22</date>
    <initials>psa</initials>
    <remark><p>Made several small editorial changes; added XML schemas.</p></remark>
  </revision>
  <revision>
    <version>0.2</version>
    <date>2003-01-08</date>
    <initials>psa</initials>
    <remark><p>Added information about non-HTTP URIs.</p></remark>
  </revision>
  <revision>
    <version>0.1</version>
    <date>2002-12-16</date>
    <initials>psa</initials>
    <remark><p>Initial version.</p></remark>
  </revision>
</header>
<section1 topic="Introduction" anchor="intro">
  <p>This document defines two XMPP protocol extensions for communicating URIs between Jabber entities, where the data formats are qualified by the 'jabber:iq:oob' and 'jabber:x:oob' namespaces. Although these mechanisms were originally used for out-of-band (OOB) data transfer, they are also used more generally to exchange or communicate URIs.</p>
</section1>
<section1 topic="jabber:iq:oob" anchor="iq-oob">
  <p>The intent of the 'jabber:iq:oob' was to provide a "least common denominator" mechanism for basic file transfers.</p>
  <p>To initiate an out-of-band file transfer with an intended recipient using the 'jabber:iq:oob' namespace, the sending application sends an &lt;iq/&gt; of type 'set' to the recipient containing a &lt;query/&gt; child element qualified by the 'jabber:iq:oob' namespace; the &lt;query/&gt; MUST in turn contain a &lt;url/&gt; child specifying the URL of the file to be transferred, and MAY contain an optional &lt;desc/&gt; child describing the file. This usage is shown in the following example.</p>
    <example caption="Sender Initiates Request-Response"><![CDATA[
<iq type='set'
    from='stpeter@jabber.org/work'
    to='MaineBoy@jabber.org/home'
    id='oob1'>
  <query xmlns='jabber:iq:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
    <desc>A license to Jabber!</desc>
  </query>
</iq>
]]></example>
    <p>The expected result is for the recipient to retrieve the file via an HTTP GET request and to then inform the sender of successful receipt of the file. The receiving application MUST NOT send the IQ result until it has retrieved the complete file (e.g., it MUST NOT send the IQ result if it has merely attempted to retrieve the file or the URL provided seems to be valid):</p>
    <example caption="Recipient Informs Sender of Success"><![CDATA[
<iq type='result'
    from='MaineBoy@jabber.org/home'
    to='stpeter@jabber.org/work'
    id='oob1'/>
]]></example>
    <p>If the recipient attempts to retrieve the file but is unable to do so, the receiving application MUST return an &lt;iq/&gt; of type 'error' to the sender specifying a Not Found condition:</p>
    <example caption="Recipient Informs Sender of Failure"><![CDATA[
<iq type='error'
    from='MaineBoy@jabber.org/home'
    to='stpeter@jabber.org/work'
    id='oob1'>
  <query xmlns='jabber:iq:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
    <desc>A license to Jabber!</desc>
  </query>
  <error code='404' type='cancel'>
    <item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
]]></example>
    <p>If the recipient rejects the request outright, the receiving application MUST return an &lt;iq/&gt; of type 'error' to the sender specifying a Not Acceptable condition:</p>
    <example caption="Recipient Rejects Request"><![CDATA[
<iq type='error'
    from='MaineBoy@jabber.org/home'
    to='stpeter@jabber.org/work'
    id='oob1'>
  <query xmlns='jabber:iq:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
    <desc>A license to Jabber!</desc>
  </query>
  <error code='406' type='modify'>
    <not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>
]]></example>
</section1>
<section1 topic="jabber:x:oob" anchor="x-oob">
  <p>The 'jabber:x:oob' namespace is used to communicate a URI to another user or application. This is done by including an &lt;x/&gt; child element qualified by the 'jabber:x:oob' namespace in either a &lt;message/&gt; and &lt;presence/&gt; stanza; the &lt;x/&gt; child MUST contain a &lt;url/&gt; child specifying the URL of the resource, and MAY contain an optional &lt;desc/&gt; child describing the resource.</p>
    <example caption="Sender Communicates a URI"><![CDATA[
<message from='stpeter@jabber.org/work'
         to='MaineBoy@jabber.org/home'>
  <body>Yeah, but do you have a license to Jabber?</body>
  <x xmlns='jabber:x:oob'>
    <url>http://www.jabber.org/images/psa-license.jpg</url>
  </x>
</message>
]]></example>
</section1>
<section1 topic="Determining Support" anchor="disco">
  <p>If an entity supports the out of band data protocol, it MUST report that by including a service discovery feature of "jabber:iq:oob" and/or "jabber:x:oob" in response to a <span class="ref"><link url="https://xmpp.org/extensions/xep-0030.html">Service Discovery (XEP-0030)</link></span> <note>XEP-0030: Service Discovery &lt;<link url="https://xmpp.org/extensions/xep-0030.html">https://xmpp.org/extensions/xep-0030.html</link>&gt;.</note> information request:</p>
  <example caption="Service Discovery information request"><![CDATA[
<iq type='get'
    from='juliet@capulet.lit/balcony'
    to='romeo@montague.lit/orchard'
    id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
]]></example>
  <example caption="Service Discovery information response"><![CDATA[
<iq type='result'
    from='romeo@montague.lit/orchard'
    to='juliet@capulet.lit/balcony'
    id='disco1'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    ...
    <feature var='jabber:iq:oob'/>
    <feature var='jabber:x:oob'/>
    ...
  </query>
</iq>
]]></example>
</section1>
<section1 topic="Use With Non-HTTP URI Schemes" anchor="nonhttp">
  <p>The value of the &lt;url/&gt; element is not limited to URIs that conform to the http: URI scheme (as specified by <span class="ref"><link url="http://tools.ietf.org/html/rfc2616">RFC 2616</link></span> <note>RFC 2616: Hypertext Transport Protocol -- HTTP/1.1 &lt;<link url="http://tools.ietf.org/html/rfc2616">http://tools.ietf.org/html/rfc2616</link>&gt;.</note>). For example, file transfers could also be effected using ftp: URIs as (specified by <span class="ref"><link url="http://tools.ietf.org/html/rfc0959">RFC 959</link></span> <note>RFC 959: File Transfer Protocol &lt;<link url="http://tools.ietf.org/html/rfc0959">http://tools.ietf.org/html/rfc0959</link>&gt;.</note>). Going further afield, several existing Jabber clients use the callto: URI scheme to initiate voice conferencing via NetMeeting or GnomeMeeting. Other out-of-band communications could be initiated in a similar way via URI schemes such as sip: (as specified by <span class="ref"><link url="http://tools.ietf.org/html/rfc3261">RFC 3261</link></span> <note>RFC 3261: Session Initiation Protocol (SIP) &lt;<link url="http://tools.ietf.org/html/rfc3261">http://tools.ietf.org/html/rfc3261</link>&gt;.</note>). All of these usages are allowed by the existing OOB namespaces, as long as the value of the &lt;url/&gt; element is a valid URI (as specified by <span class="ref"><link url="http://tools.ietf.org/html/rfc3986">RFC 3986</link></span> <note>RFC 3986: Uniform Resource Identifiers (URI): Generic Syntax &lt;<link url="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</link>&gt;.</note>).</p>
</section1>
<section1 topic="Integration With Stream Initiation (retracted)" anchor="si">
  <p><note>Up to and including revision 1.5 of this XEP, this section defined a non-normative integration with Stream Initiation, itself deprecated. To retain section numbering, this text remains as a placeholder.</note></p>
</section1>
<section1 topic="Security Considerations" anchor="security">
  <p>As with any mechanism that communicates a URI, care must be taken by the receiving application to ensure that the resource retrieved does not contain harmful or malicious data (e.g., a virus-infected file).</p>
</section1>
<section1 topic="IANA Considerations" anchor="iana">
  <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
</section1>
<section1 topic="XMPP Registrar Considerations" anchor="registrar">
  <p>The 'jabber:iq:oob' and 'jabber:x:oob' namespaces are included in the protocol namespaces registry maintained by the <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> (see &lt;<link url="https://xmpp.org/registrar/namespaces.html">https://xmpp.org/registrar/namespaces.html</link>&gt;).</p>
</section1>
<section1 topic="XML Schemas" anchor="schemas">
  <section2 topic="jabber:iq:oob" anchor="schemas-iq">
    <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='jabber:iq:oob'
    xmlns='jabber:iq:oob'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-0066: http://www.xmpp.org/extensions/xep-0066.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='query'>
    <xs:complexType>
      <xs:sequence>
        <xs:element name='url' type='xs:string' minOccurs='1'/>
        <xs:element name='desc' type='xs:string' minOccurs='0'/>
      </xs:sequence>
      <xs:attribute name='sid' type='xs:string' use='optional'/>
      <!--
          Note that the sid attribute is a remnant of the retracted
          Session Initiation integration, and therefore always unused
       -->
    </xs:complexType>
  </xs:element>

</xs:schema>
]]></code>
  </section2>
  <section2 topic="jabber:x:oob" anchor="schemas-x">
    <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='jabber:x:oob'
    xmlns='jabber:x:oob'
    elementFormDefault='qualified'>

  <xs:annotation>
    <xs:documentation>
      The protocol documented by this schema is defined in
      XEP-0066: http://www.xmpp.org/extensions/xep-0066.html
    </xs:documentation>
  </xs:annotation>

  <xs:element name='x'>
    <xs:complexType>
      <xs:sequence>
        <xs:element name='url' type='xs:string' minOccurs='1'/>
        <xs:element name='desc' type='xs:string' minOccurs='0'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
]]></code>
  </section2>
</section1>
</xep>
