Stickers  are images or short animations that often represent an emoticon or an action. They are increasingly used in private messaging in the last years, especially on mobile phone apps. Stickers can be more nuanced and expressive than emoticons. They can be used to convey emotions or tell stories in a fun and easy way.
Recently, demand to implement stickers, including their social feature of sharing sticker packs arised within the XMPP community. This specification is to fulfill this demand.
Sticker packs are stored on pubsub nodes. They SHOULD be located at a personal eventing (PEP) node named "urn:xmpp:stickers:0" but MAY be located at a generic publish-subscribe node that is not attached to a user's IM account. The pubsub node's access model SHOULD be set to 'open', so that other users can fetch sticker packs.
Each sticker pack is one item on the pubsub node consisting of a
<pack/> element includes elements
<summary/> to announce a name and summary of the sticker pack that can be displayed to users, respectively.
The summary MAY contain copyright and license information in user-readable format.
<summary/> elements MAY be included given that no two elements of same name specify the same
<pack/> element MAY include a
<restricted/> element to indicate that this sticker pack may not be used or imported by other users.
<pack/> element contains one or more
<item/> elements that include details on the stickers in the pack. Each
<item/> element has
<file/> element as described in File metadata element (XEP-xxxx) . The metadata MUST include one or multiple
<hash/> elements as described in Use of Cryptographic Hash Functions in XMPP (XEP-0300) . All stickers in a pack MUST use the same algorithm for their
<hash/> elements. The metadata MUST include one
<desc/> element that is not qualified by a
xml:lang attribute and describes the textual fallback (often an emoji or a sequence of emojis) of the sticker. Each
<item/> element further has a
<sources/> element as described in Stateless file sharing (XEP-xxxx)  describing how to retrieve the image file of the sticker. Each
<item/> element MAY include one or more
<suggest/> elements that include a text that clients may replace with the sticker.
<suggest/> elements MAY have an
<pack/> element includes a single
<hash/> element as described in Use of Cryptographic Hash Functions in XMPP (XEP-0300) , specifying the hash of the sticker pack. See next section on how such hash is generated.
Each sticker pack has a unique ID, which is used as the pubsub item's id. This ID is derived from a hash of significant information from a
<pack/> element as outlined in this section.
xml:langattribute value and content.
xml:langattribute and content, resulting in a single octet string for the
The result of this step is referenced as Meta string later.
For each of
<hash/> element in
algoattribute and content.
algoattribute and content, resulting in a single octet string for the
<desc/>content first and then all
<hash/>elements ordered from lesser to greater.
The result of this step is referenced as Stickers string later.
The ID of the sticker pack is dervied by taking the first 144 bit of the hash and encode it using Base64. This is equivalent to the first 24 characters of the Base64 encoded content of the
The sending entity uses Stateless file sharing (XEP-xxxx)  to send the image file from the sticker pack. The
<sources/> elements from the sticker pack are used as a template. The sending entity MAY add additional
<hash/> elements or sources.
Additionally, the sending entity adds an element
<sticker/> to the message. This element carries an attribute
pack referring to the id of the pubsub item carrying the sticker pack. If the sticker pack resides on a pubsub item other than the senders personal eventing (PEP) node named "urn:xmpp:stickers:0", the sending entity must add additional attributes
node, referring to the jid of the pubsub node and the name of the node, respectively.
The sending entity SHOULD use the
<desc/> content as the message body, except if the sticker was selected based on a suggestion, in which case the content of the corresponding
<suggest/> SHOULD be used.
When receiving a message with a
<sticker/> element, the receiving entity SHOULD consider the message and the
<file-sharing/> element as a sticker.
When receiving a sticker, the receiving entity may display the stickers image file inline or display the textual representation in the
<desc/> element. The receiving entity SHOULD NOT display the received sticker only as a downloadable file.
When receiving a sticker or any other reference to a sticker pack, the receiving entity may allow the user to import such sticker pack. The receiving entity SHOULD NOT offer to import a sticker pack that has a
When importing a sticker pack, the entity SHOULD make all files that are part of the sticker pack locally available. The entity SHOULD duplicate the pubsub item from its original source to the users personal eventing (PEP) node named "urn:xmpp:stickers:0", preserving the pack id. The entity MAY remove any of the sources provided, and MAY make an effort to make the files available at additional sources, e.g. by using HTTP File Upload (XEP-0363) .
When handling this URI, the entity SHOULD display a preview of the sticker pack and allow importing it as described above.
Flickering, flashing or blinking stickers can induce seizures or other incapacitating physical reactions. It is RECOMMENDED that clients that support stickers have an option to disable animations and/or stickers entirely.
The security considerations of Stateless file sharing (XEP-xxxx)  apply.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) .
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).
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.
## 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. ##
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.
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 <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <email@example.com> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <firstname.lastname@example.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
2. XEP-xxxx: File metadata element <https://xmpp.org/extensions/inbox/file-metadata.html>.
7. 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 <http://www.iana.org/>.
8. 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 <https://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/