Skip to content

Message Formats

Tomer edited this page Nov 17, 2017 · 23 revisions

The following message formats are known but not necessarily parsed (implemented) yet. This page is useful when you want to support a type of event which is not implemented yet by the API, or if you just want to have an idea of what certain events look like in XMPP.

Events added by maritaria:

When your bot gets added to a group (the bot has chatted with the inviter, so it gets added immediately)

<message from="[NUMBERS][email protected]" to="[email protected]" type="groupchat" id="[GUID]" xmlns="jabber:client">
    <kik qos="true" app="all" hop="true" timestamp="1510865418472" push="false"/>
    <request d="false" r="false" xmlns="kik:message:receipt"/>
    <roster/>
    <g is-public="true" jid="[NUMBERS][email protected]"><!-- NUMBERS same as message.from -->
        <code>#[PUBLIC_GROUP_HASH]</code>
        <n>Bot testing ground</n>
        <pic ts="1505911808105">http://profilepics.cf.kik.com/[REDACTED]</pic>
        <m>[JID]@talk.kik.com</m><!-- The jid of the bot is also in the list -->
        <m>[JID]@talk.kik.com</m><!-- Some other member -->
        <m s="1" a="1">[JID]@talk.kik.com</m><!-- Owner account, S=owner A=admin -->
    </g>
    <sysmsg xmlns="kik:msg:info">[FIRSTNAME] [LASTNAME] has added you to the chat</sysmsg>
</message>

When someone leaves a (public) group your bot is a member of.

<message type="groupchat" xmlns="jabber:client" id="[GUID]" from="[NUMBERS][email protected]" to="[BOT_JID]@talk.kik.com"><!-- JID of group -->
	<kik timestamp="1510911460608" push="false" app="all" qos="true" hop="true"/>
	<request d="false" r="false" xmlns="kik:message:receipt"/>
	<roster/>
	<g jid="[NUMBERS][email protected]"> <!-- JID of group -->
		<l>[USER_JID]@talk.kik.com</l><!-- JID of user that left -->
	</g>
	<status jid="[USER_JID]@talk.kik.com">[FIRSTNAME] [LASTNAME] has left the chat</status>
</message>

When someone starts or is typing:

<message id="[GUID]" type="groupchat" xmlns="kik:groups" from="[TYPING_USER_JID]@talk.kik.com" to="[BOT_JID]@talk.kik.com">
	<pb/>
	<kik timestamp="1510911793198" push="false" app="chat" qos="false" hop="true"/>
	<is-typing val="true"/>
	<g jid="[GROUP_JID]@groups.kik.com"/><!-- the group the user is typing in -->
</message>

When someone stops typing

<message id="[GUID]" type="groupchat" xmlns="kik:groups" from="[TYPING_USER_JID]@talk.kik.com" to="[BOT_JID]@talk.kik.com">
	<pb/>
	<kik timestamp="1510911793414" push="false" app="chat" qos="false" hop="true"/>
	<is-typing val="false"/>
	<g jid="[GROUP_JID]@groups.kik.com"/>
</message>

When someone sends a message in a group:

<message id="[GUID]" type="groupchat" cts="1510911505345" xmlns="kik:groups" from="[USER_JID]@talk.kik.com" to="[BOT_JID]@talk.kik.com">
	<body>Is vervelend... aan de plus kant ik weet nu hoe het eruit ziet als iemand we gaat...</body><!-- This is the original message as captured during the test -->
	<pb/>
	<preview>Is vervele...</preview><!-- some shortened version of the body -->
	<kik timestamp="1510911505345" push="true" app="chat" qos="true" hop="true"/>
	<request d="true" r="true" xmlns="kik:message:receipt"/>
	<ri/>
	<g jid="[GROUP_JID]@groups.kik.com"/><!-- group the message was posted in -->
</message>
Clone this wiki locally