Page tree
Skip to end of metadata
Go to start of metadata

This documentation may be out of date and has been replaced with: https://docs.atlassian.com/hipchat.xmpp/latest/

Documenting the HipChat-specific alterations to the base XMPP protocols we use: XMPP CoreXMPP Instant Messaging and PresenceXMPP Multi-User Chat (XEP-0045).  Custom extensions are primarily needed to provide additional functionality, while in other cases, needed to cut down on the amount of traffic required, which is particularly important for mobile clients.

Authentication

A quick auth method

Requires TLS upgrade or port 5223 first, just like other auth methods.

<!-- server sends the stream:feature like: -->
<stream:features><auth xmlns="http://hipchat.com"/></stream:features>

<!-- client passes up 0 + email + 0 + password + 0 + resource, base64 encoded -->
<!-- node and ver should contain the same values provided on the initial presence -->
<auth xmlns="http://hipchat.com" node="http://hipchat.com/client/mac" ver="22">AGdhcnJldEBoaXBjaGF0LmNvbQBnYXJyZXQAdGVzdA==</auth>

<!-- server responds with success containing full jid and host namespaces -->
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" jid="1_1@chat.hipchat.com/iphone" api_host="api.hipchat.com" chat_host="chat.hipchat.com" muc_host="conf.hipchat.com" web_host="www.hipchat.com"/>

Authentication with oauth2 token

 

<!-- server sends the stream:feature like: -->
<stream:features><auth xmlns="http://hipchat.com"/></stream:features>

<!-- client passes up 0 + token + 0 + resource, base64 encoded -->
<!-- note the additional 'mechanism' attribute -->
<auth xmlns="http://hipchat.com" node="http://hipchat.com/client/mac" ver="22" mechanism="oauth2">AGdhcnJldEBoaXBjaGF0LmNvbQBnYXJyZXQAdGVzdA==</auth>

<!-- server responds with success containing full jid and host namespaces -->
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" jid="1_1@chat.hipchat.com/iphone" api_host="api.hipchat.com" chat_host="chat.hipchat.com" muc_host="conf.hipchat.com" web_host="www.hipchat.com"/>

 

Request Auth Token

<!-- request -->
<iq type="get" id="1" to="conf.hipchat.com">
  <query xmlns="http://hipchat.com/protocol/auth" />
</iq>
 
<!-- response -->
<iq xmlns='jabber:client' type='result' from='conf.hipchat.com' id='1' to='1_1@chat.hipchat.com/mac'>
  <query xmlns='http://hipchat.com/protocol/auth'>
    <token expiration='1395755218' ttl='3600'>EXSFBabokEfqKS9</token>
  </query>
</iq>

Request oauth2 Token

<!-- server sends the stream:feature like: -->
<stream:features><auth xmlns="http://hipchat.com"/></stream:features>

<!-- client passes up 0 + email + 0 + password + 0 + resource, base64 encoded and the oauth2_token="true" attribute -->
<!-- node and ver should contain the same values provided on the initial presence -->
<auth xmlns="http://hipchat.com" node="http://hipchat.com/client/mac" ver="22" oauth2_token="true">AGdhcnJldEBoaXBjaGF0LmNvbQBnYXJyZXQAdGVzdA==</auth>

<!-- server responds with success containing full jid and host namespaces, and a 30-day oauth2 token (expiration will be reset on subsequent auth) -->
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" jid="1_1@chat.hipchat.com/iphone" api_host="api.hipchat.com" chat_host="chat.hipchat.com" muc_host="conf.hipchat.com" web_host="www.hipchat.com" oauth2_token="rPR70duKKF5SBrhKSUWEHBcjjO4ba83nfxNgaUTyi0q" />

Revoke Oauth2 Auth Token

Clients should do this whenever the user manually signs out of the app (effectively dissociating the user account from that device).

<!-- revoke oauth token associated with this XMPP session/client -->
<iq type="set" id="1">
  <query xmlns="http://hipchat.com/protocol/auth" action="delete">
    <type>oauth2</type>
  </query>
</iq>

<!-- response -->
<iq xmlns='jabber:client' type='result' from='conf.hipchat.com' id='1' to='1_1@chat.hipchat.com/mac' />

This Oauth2 revocation iq currently doesn't function. It's better to hit the corresponding API v2 endpoint instead.

 

Devices

Add an iOS device

<!-- request -->
<iq type="set" id="1">
  <query xmlns="http://hipchat.com/protocol/device" type="ios">
    <token>123abc</token>
  </query>
</iq>
 
<!-- response -->
<iq type="result" id="1"/>

Add an Android device

<!-- request -->
<iq type="set" id="1">
  <query xmlns="http://hipchat.com/protocol/device" type="android">
    <device_id>abcdefg</device_id>
    <registration_id>1234567890</reg_id>
  </query>
</iq>
 
<!-- response -->
<iq type="result" id="1"/>

Remove a device

Removes all the devices of the given type on the user's account.

<!-- request -->
<iq type="delete" id="1">
  <query xmlns="http://hipchat.com/protocol/device" type="ios"/>
</iq>
 
<!-- response -->
<iq type="result" id="1"/>

Discovery

Ignore archived rooms in MUC disco#items

When requesting the room list, set include_archived='false' and archived rooms will not be returned.

<iq id="1" type="get" to="conf.hipchat.com">
  <query xmlns="http://jabber.org/protocol/disco#items" include_archived="false" />
</iq>

Special HipChat room information

The MUC disco#items and room disco#info requests include HipChat-specific room information.

<!-- requesting list of rooms -->
<iq type="get" to="conf.hipchat.com">
  <query xmlns="http://jabber.org/protocol/disco#items"/>
</iq>
 
<!-- response -->
<iq from='conf.hipchat.com' type='result' to='1_1@chat.hipchat.com/mac'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item jid='1_hipchat@conf.hipchat.com' name='HipChat'>
      <x xmlns='http://hipchat.com/protocol/muc#room'>
        <id>1</id>
        <topic>This is the topic</topic>
        <privacy>public</privacy>
        <owner>1_1@chat.hipchat.com</owner>
        <num_participants>0</num_participants>
        <guest_url/>
        <last_active>1343073497</last_active>
      </x>
    </item>
    <item>...</item>
    <item>...</item>
    <item>...</item>
  </query>
</iq>
<!-- requesting specific room info -->
<iq type="get" to="1_hipchat@conf.hipchat.com">
  <query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>
 
<!-- response -->
<iq from='1_hipchat@conf.hipchat.com' type='result' to='1_1@chat.hipchat.com/mac'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity category='conference' type='text' name='HipChat'/>
    <feature var='http://jabber.org/protocol/muc'/>
    <feature var='muc_membersonly'/>
    <x xmlns='http://hipchat.com/protocol/muc#room'>
      <id>1</id>
      <topic>testing topic change</topic>
      <privacy>public</privacy>
      <owner>1_1@chat.hipchat.com</owner>
      <num_participants>1</num_participants>
      <guest_url/>
      <last_active>1343073497</last_active>
    </x>
  </query>
</iq>

Room push

Room pushes will happen whenever:

  1. A room changes name, privacy, or archived state
  2. A new room is added to the group
  3. A room is removed from the group

 

<!-- room deleted -->
<iq to='1_2@chat.hipchat.com' type='set'>
    <query xmlns='http://hipchat.com/protocol/muc#room'>
        <item status='deleted' jid='1_test_room@conf.hipchat.com'/>
    </query>
</iq>
 

<!-- room added or changed -->
<iq to='1_2@chat.hipchat.com' type='set'>
    <query xmlns='http://hipchat.com/protocol/muc#room'>
        <item jid='1_test_room@conf.hipchat.com' name='Test Room'>
            <id>2</id>
            <topic>O hai</topic>
            <privacy>private</privacy>
            <owner>1_2@chat.hipchat.com</owner>
            <guest_url/>
            <num_participants>0</num_participants>
        </item>
    </query>
</iq>

 
<!-- room archived -->
<iq to='1_1@chat.hipchat.com' type='set'>
    <query xmlns='http://hipchat.com/protocol/muc#room'>
        <item jid='1_some_room@conf.hipchat.com' name='Some room'>
            <id>3</id>
            <topic>Wat</topic>
            <privacy>public</privacy>
            <owner>1_1@chat.hipchat.com</owner>
            <guest_url/>
            <num_participants>1</num_participants>
            <is_archived/>
            <last_active>1406243278</last_active>
        </item>
    </query>
</iq>

Both files and links follow the same format (only xmlns changes) and have the same attributes. Either "before" or "after" may be used in a given request, but not both.

<!-- Files example - room request w/before date -->
<iq id="1" type="get" to="1_hipchat_room@conf.hipchat.com">
  <query xmlns="http://hipchat.com/protocol/files" before="2013-04-10T13:31:00Z" limit="50" />
</iq>

 
<!-- Links example - 1:1 request w/after date -->
<iq id="1" type="get" to="1_1@chat.hipchat.com">
  <query xmlns="http://hipchat.com/protocol/links" after="2013-04-10T13:31:00Z" limit="50" />
</iq>

Request emoticons

<!-- Request -->
<iq type="get" id="emoticon_C318AD0A-D20A-4594-BFC7-1968DD6DCC21">
	<query xmlns="http://hipchat.com/protocol/emoticons" ver="2014-07-08T14:40:06Z"/>
</iq>
 
<!-- Response -->
<iq to='10804_853140@chat.hipchat.com/Android-000000000000000||proxy|proxy-d22.hipchat.com|5252' type='result' id='WJNOk-4'>
	<query xmlns='http://hipchat.com/protocol/emoticons' ver='2014-10-30T16:50:04Z'>
		<path_prefix>https://dujrsrsgsd3nh.cloudfront.net/img/emoticons</path_prefix>
		<item>
			<id>68704</id>
			<path>10804/1up-1402428180.png</path>
			<shortcut>1up</shortcut>
			<w>24</w>
			<h>24</h>
		</item>
		<item>...</item>
		<item>...</item>		
	</query>
</iq>

Echo

Normally 1-1 messages sent by a user are not sent back to them. We need to do this in order to return message metadata and delivery confirmations. Just include an ID and <echo> node in the message:

<message from="1_1@chat.hipchat.com/mac" to="1_1@chat.hipchat.com/mac" type="chat" id="message_209">
  <active xmlns="http://jabber.org/protocol/chatstates" />
  <body>hi! http://twitter.com/hipchat</body>
  <x xmlns="http://hipchat.com">
    <echo />
  </x>
</message>
 
<!-- the echoed message will include additional data in this case -->
<message to='1_1@chat.hipchat.com/mac' type='chat' id='message_209' from='1_1@chat.hipchat.com/mac' mid='ed600087-7206-47e6-bc7a-914c89f09739'>
  <body>hi! http://twitter.com/hipchat</body>
  <active xmlns='http://jabber.org/protocol/chatstates'/>
  <x xmlns='http://hipchat.com'>
    <metadata>
      <name>HipChat</name>
      <url>http://twitter.com/hipchat</url>
      <profile_image_url>http://a0.twimg.com/profile_images/411250504/hipchat_128_normal.png</profile_image_url>
      <followers>3329</followers>
      <type>twitter_user</type>
      <screen_name>HipChat</screen_name>
    </metadata>
  </x>
  <delay xmlns='urn:xmpp:delay' stamp='2012-11-06T20:28:39Z 957805' from_jid='1_1@chat.hipchat.com/mac'/>
</message>

File sharing

Hit the /api/upload_file API to upload the file and get its data, then send a message as shown below.

Room (old)

<message to="1_hipchat@conf.hipchat.com" type="groupchat">
  <body>File uploaded: https://s3-eu-west-1.amazonaws.com/devuploads-eu.hipchat.com/1/1/w0omlvsbldweus4/281445_783489269236_1741514104_n.jpg -- coco</body>
  <x xmlns="http://hipchat.com/protocol/muc#room">
    <file>
      <name>1/1/w0omlvsbldweus4/281445_783489269236_1741514104_n.jpg</name>
      <desc>coco</desc>
      <bucket>devuploads-eu.hipchat.com</bucket>
      <size>90617</size>
      <thumb>1/1/w0omlvsbldweus4/281445_783489269236_1741514104_n_thumb.jpg</thumb>
    </file>
  </x>
</message>

Room (new)

Just include the ID of the uploaded file as returned by /api/upload_file. The body of the message is also not required and will be generated automatically on the server. Note the simpler namespace too.

<message to="1_hipchat@conf.hipchat.com" type="groupchat">
  <x xmlns="http://hipchat.com/">
    <file id="123" />
  </x>
</message>

1-1 (old)

<message id="m_364" to="1_1@chat.hipchat.com" type="chat">
  <body>File uploaded: https://s3-eu-west-1.amazonaws.com/devuploads-eu.hipchat.com/1/1/w0omlvsbldweus4/281445_783489269236_1741514104_n.jpg -- coco</body>
  <x xmlns="http://hipchat.com/protocol/muc#room">
    <file>
      <name>1/1/w0omlvsbldweus4/281445_783489269236_1741514104_n.jpg</name>
      <desc>coco</desc>
      <bucket>devuploads-eu.hipchat.com</bucket>
      <size>90617</size>
      <thumb>1/1/w0omlvsbldweus4/281445_783489269236_1741514104_n_thumb.jpg</thumb>
    </file>
  </x>
</message>

1-1 (new)

<message to="1_1@chat.hipchat.com" type="chat">
  <x xmlns="http://hipchat.com/">
    <file id="123" />
  </x>
</message>

History

Requesting previous history

<iq type="get" to=1_1@chat.hipchat.com" id="1">
  <query xmlns="http://hipchat.com/protocol/history" before="2013-06-27T10:10:58Z" maxstanzas="50" type="chat|groupchat" />
</iq>


Pings

We support XEP-0199 pings, which are helpful to detect if anyone is actually listening on the other end of the socket.

// Ping (tetra-proxy accepts less than what the official spec requires
<iq><ping /></iq>
 
// Pong
<iq type='result'/>
We also support a variation on XEP-0198 Acks, which can be used as an even lighter-weight pinging method.

 

// Ping 
<r/>
 
// Pong
<a/>

 

Note that when using pings, it's best to send pings only when the socket is quiet. For example, if my client receives a presence stanza, there's no need to immediately send a ping, since we know our connection to the server is alive. Usually this means resetting the ping timer any time we receive an inbound stanza.

Presence

Client information in initial presence

Official doc here. We don't follow it. Ensure the XMPP library you use does not Base64 c's ver attribute. We use 'ver' to pass up the version of the client.

<presence>
  <c node="http://hipchat.com/client/air/mac" ver="1.20120710085949" os_ver="10.8.2" xmlns="http://jabber.org/protocol/caps" />
</presence>

The node values we expect are defined in the web code.

Blocking contact presences

Clients can also request that initial presences from other users are not automatically sent:

<presence roster_presences="false" />

Requesting presences

To request all the roster presences:

<!-- Request -->
<iq type="get" id="1">
  <query xmlns="http://hipchat.com/protocol/presence" />
</iq>
 
<!-- Response -->
<presence from="1_2@chat.hipchat.com" />
<presence from="1_3@chat.hipchat.com" />
<iq type="result" id="1" /> <!-- sent after presences, but is not guaranteed to arrive in that order -->

This will cause presences for each user in the roster to be sent.

To request roster presences from a subset of users:

<!-- Request -->
<iq type="get" id="1">
  <query xmlns="http://hipchat.com/protocol/presence">
    <uid>5</uid>
    <uid>7</uid>
  </query>
</iq>
 
<!-- Response -->
<presence from="1_5@chat.hipchat.com" />
<presence from="1_7@chat.hipchat.com" />
<iq type="result" id="1" /> <!-- sent after presences, but is not guaranteed to arrive in that order -->

Limiting presence subscriptions

Clients can limit the set of users for which they receive presence updates, which can significantly cut down on network traffic in large groups.

<!-- Request -->
<iq type="set" id="925">
  <query xmlns="http://hipchat.com/protocol/presence" action="presence_filter">
    <uid>5</uid>
    <uid>7</uid>
  </query>
</iq>

<!-- Response -->
<iq type="result" id="925" />
 
<!-- Now you'll only receive presence broadcasts from users 5 and 7 -->

You may also "resubscribe" to presence broadcasts for all users in the group by sending an empty uid list.

<!-- Request -->
<iq type="set" id="925">
  <query xmlns="http://hipchat.com/protocol/presence" action="presence_filter" />
</iq>

<!-- Response -->
<iq type="result" id="925" />
 
<!-- Now you'll receive presence broadcasts from all users -->

Rooms

Entering a room (XEP-0045 standard)

http://xmpp.org/extensions/xep-0045.html#enter (note this is NOT groupchat, this is a MUC entrance:)

<x xmlns='http://jabber.org/protocol/muc'/>

Optional suppression of presences from room occupants

Per XEP-0045:

If the service is able to add the user to the room, it MUST send presence from all the existing participants' occupant JIDs to the new occupant's full JID

HipChat provides the option to limit the number of presence stanzas sent for each occupant (or suppress them entirely). This is accomplished through a limit element in the MUC entrance stanza:

<presence
    from='hag66@shakespeare.lit/pda'
    id='n13mt3l'
    to='coven@chat.shakespeare.lit/thirdwitch'>
  <x xmlns='http://jabber.org/protocol/muc'/>
  <limit maxmemberpresences="10" xmlns="http://hipchat.com" />
</presence> 

Sending a MUC message (XEP-0045 standard)

http://xmpp.org/extensions/xep-0045.html#message

Inviting users

When inviting users to a room, we accept multiple <invite> nodes in a single message stanza (the spec only ever uses one):

<message from="1_1@chat.hipchat.com" to="1_hipchat@conf.hipchat.com">
  <x xmlns="http://jabber.org/protocol/muc#user">
    <invite to="1_2@chat.hipchat.com">
      <reason>hello!</reason>
    </invite>
    <invite to="1_3@chat.hipchat.com">
      <reason>hello!</reason>
    </invite>
  </x>
</message>

Archive room

<iq type='set' to='26985_werqqwer@conf.hipchat.com'>
	<query xmlns='http://hipchat.com'>
		<is_archived>1</is_archived>
	</query>
</iq>

Rename Room

<iq type='set' to='26985_saf@conf.hipchat.com'>
 <query xmlns='http://hipchat.com'>
 <rename>new name</rename>
 </query>
</iq>

Change Room Privacy

<iq type='set' to='26985_saf@conf.hipchat.com'>
 <query xmlns='http://hipchat.com'>
 <privacy>public</privacy> <!-- or private -->
 </query>
</iq>

Delete Room

As per http://xmpp.org/extensions/xep-0045.html#destroyroom

Guest Access State

Set Guest Access

<iq type='set' to='26985_heyeyeyeyey@conf.hipchat.com'>
	<query xmlns='http://hipchat.com'>
		<guest_access>1</guest_access>
	</query>
</iq>

Notification of Guest Access Added

<message type='groupchat' from='26985_heyeyeyeyey@conf.hipchat.com/Ian Monroe' to='26985_191381@chat.hipchat.com/linux'>
	<x xmlns='http://hipchat.com'>
		<guest_url>http://www.hipchat.com/gK1KNSaQH</guest_url>
	</x>
</message> 

Notification of Guest Access Removed

<message type='groupchat' from='26985_heyeyeyeyey@conf.hipchat.com/Ian Monroe' to='26985_191381@chat.hipchat.com/linux'>
	<x xmlns='http://hipchat.com'><guest_url/></x>
</message>

1-1 Chats

Profile Request

<iq type="get" to="10804_157983@chat.hipchat.com" id="profile_498F941D-9B4D-4B2E-BED3-31E5A62E83AA">
	<query xmlns="http://hipchat.com/protocol/profile"/>
</iq>
 
<iq xmlns="jabber:client" from="10804_157983@chat.hipchat.com" type="result" id="profile_498F941D-9B4D-4B2E-BED3-31E5A62E83AA" to="10804_157983@chat.hipchat.com/osx-64051">
	<query xmlns="http://hipchat.com/protocol/profile">
		<email>npetrov@atlassian.com</email>
		<name>Nikolay Petrov</name>
		<mention_name>npe</mention_name>
		<photo_large>https://www.hipchat.com/img/silhouette_125.png</photo_large>
		<photo_small>https://www.hipchat.com/img/silhouette_36.png</photo_small>
		<!-- Timezone is optional element -->
		<timezone utc_offset="-420.0">UTC</timezone>
		<title>Senior Developer</title>
		<skype_name/>
	</query>
</iq>

Startup

The special startup request is designed to return info needed for quick application loading, especially on mobile. You can optionally pass a send_auto_join_user_presences attribute, which when "true" will cause the server to push presences for the union of these user sets:

  • Users with which this user has 1-1 chats in the auto-join list
  • Users who are occupants of rooms in the user's auto-join list
<!-- Request -->
<iq type="get" id="1">
  <query xmlns="http://hipchat.com/protocol/startup" send_auto_join_user_presences="true"/>
</iq>
  
<!-- Response -->
<iq type="result" id="1">
  <query xmlns="http://hipchat.com/protocol/startup">
    <user_id>1</user_id>
    <group_id>1</group_id>
	<group_name>Some Company</group_name>
	<group_uri_domain>mycompany.hipchat.com</group_uri_domain>
    <group_invite_url>https://www.hipchat.com/invite/1234/4321</group_invite_url> <!-- if inviting has been disabled, this will not be included -->
    <email>user@domain.com</email>
    <mention_name>FirstLast</mention_name>
    <name>First Last</name>
    <photo_large>http://...</photo_large>
    <photo_small>http://...</photo_small>
    <title>Job Title</title>

    <is_admin>False</is_admin> <!-- or True. We should make this an int... -->

    <preferences>
      <autoJoin>
        <item jid="1_22@chat.hipchat.com"/>
        <item jid="1_66@chat.hipchat.com"/>
        <item jid='1_development@conf.hipchat.com' name='Development'>
          <x xmlns='http://hipchat.com/protocol/muc#room'>
            <id>1</id>
            <topic>This is the topic</topic>
            <privacy>public</privacy>
            <owner>1_1@chat.hipchat.com</owner>
            <num_participants>0</num_participants>
            <guest_url/>
            <last_active>1343073497</last_active>
          </x>
        </item>
      </autoJoin>

      <notifications>
        <mention>email</mention>
        <oto_message>email</oto_message>
        <oto_message>sms</oto_message>
        <room_invite>sms</room_invite>
      </notifications>
    </preferences>

	<!-- TODO: This will be removed in favor of the features block for determining whether a feature should be enabled -->
	<perms>
	    <create_rooms>all</create_rooms>
    	<file_sharing>none</file_sharing>
	    <guest_access>none</guest_access>
	    <history_edit_perm>all</history_edit_perm>
	    <oto_chat>none</oto_chat>
	    <profile_edit>all</profile_edit>
	    <send_invites>all</send_invites>
	</perms>
 
	<!-- Clients use this block to determine UX for various parts of the UI -->
	<!-- Not all of the items are necessarily relevant to the client UI (we send down all the group perms generically) -->
	<features>
		<send_invites>1</send_invites>
		<history_edit_perm>1</history_edit_perm>
		<create_rooms>1</create_rooms>
		<private_rooms>1</private_rooms>
		<view_oto_chats>0</view_oto_chats>
		<video>1</video>
		<profile_edit>0</profile_edit>
		<file_sharing>1</file_sharing>
		<guest_access>0</guest_access>
		<oto_chat>1</oto_chat>
	</features>
 
    <plan type="1" name="HipChat Free" />

    <token expiration="1395755218" ttl="3600">abc123</token> <!-- current auth token so it doesn't have to be fetched separately -->
 
    <addlive_app_id>adlxxx</addlive_app_id> <!-- needed? -->
  </query>
</iq>

Testing

Triggering stanza errors

Add the `trigger_error` and optional `trigger_error_text` attributes to any stanza to trigger an error response to that stanza.

<!-- Request -->
<iq type="get" id="1" trigger_error='forbidden' trigger_error_text='Rejected!'>
  <query xmlns="http://hipchat.com/protocol/startup"/>
</iq>
  
<!-- Response -->
<iq type="error" id="1">
  <query xmlns="http://hipchat.com/protocol/startup"/>
  <error code='403' type='auth'>
    <forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
    <text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Rejected!</text>
  </error>
</iq>

Triggering stream errors

<!-- Request -->
<iq id="1" type="get">
  <query xmlns="http://hipchat.com/protocol/testing">
    <stream_error condition="conflict">
    <!-- a 'text' attribute on the stream_error element is also allowed -->
  </query>
</iq>
  
<!-- Response -->
<stream:error><conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error>
</stream:stream>

Triggering a slow request

Use to simulate a slow response. The server will sleep for X seconds (max 60) before handling the request in the normal way. This can be combined with the trigger_error attribute too.

<!-- Request -->
<iq type="get" id="1" trigger_delay='5'>
  <query xmlns="http://hipchat.com/protocol/startup"/>
</iq>

Updates

Trigger update check in the client

<message from='chat.hipchat.com' to='26985_191381@chat.hipchat.com/osx'>
	<x xmlns='http://hipchat.com/protocol/update' />
</message>

 


 

  • No labels