Kik

Dialogflow Kik integration allows you to easily create Kik bots with natural language understanding based on the Dialogflow technology.

Setting Up Kik

In order to set up the Kik integration for your agent, you'll need the following:

  • a Kik account
  • the Kik app installed on a mobile device

Creating your Kik Bot

  1. Go to https://dev.kik.com
  2. Open the Kik app and go to Settings > Your Kik Code
  3. Tap on the camera icon on the bottom of the screen
  4. Scan the code in the browser
  5. In the Kik app, in the chat with Botsworth, enter a name for your bot and tap the Yes button to confirm
  6. On the Kik Dev page, click Configuration at the top and copy the API Key

Setting Up Dialogflow

  1. In Dialogflow, go to Integrations in the left hand menu
  2. Click on the Kik tile
  3. Enter the related values into the following fields:
    1. Kik Bot Name
    2. Kik API Key
  4. Click the Start button

Testing

You can test your agent directly in the Kik app. Just go back to the main page of the app, where your conversations are listed and tap on the conversation with your bot. You should be able to test your agent from here.

Events

The following events are invoked by this integration:

Event Description
KIK_WELCOME Triggered when a user starts a conversation with your Kik bot.

Rich response messages

The following rich response messages are supported.

Image responses

Supported formats and sizes:

  • jpg
  • 1 MB max size
  • to send animated gifs, use video format in Custom payload

Card responses

Cards are not natively supported in Kik, so they are sent as separate elements: image with title, subtitle as a text message, and buttons.

For buttons, only a URL is supported as a postback – in this case, it is displayed as an image with linked URL. If you leave the postback field blank, when such a button is tapped, the button title is sent as a user query to the agent.

Quick reply responses

Quick replies are supported in Kik integrations and correspond to a text version of Suggested response keyboards in Kik with a reduced number of replies and characters.

If you want to use a full version, you can do it through the Custom payload.

When a user clicks one of the buttons, all buttons are dismissed. This prevents the issue where users could click buttons that are attached to old messages in a conversation.

Custom payload responses

See the integration's developer docs for more information:

Gifs in one-click Kik integration

The following payload example sends animated gifs:

{
  "kik": {
    "type": "video",
    "videoUrl": "https://raw.githubusercontent.com/svet4/images/master/img/create-an-intent.gif",
    "autoplay": true
  }
}

For more information, see Kik documentation.

Videos in one-click Kik integrations

Your Kik bots can send playable videos.

The Kik mobile client requires that all videos are in mp4 format with h264 video and aac audio. If you provide a video with different specifications, it will be transcoded, which greatly increases the time required to send your messages. For more, please read Kik documentation.

The following example sends a playable video from your Kik bot to a Kik mobile client:

{
  "kik": {
    "type": "video",
    "videoUrl": "https://example.com/RichMessagesFiles/studebaker_1950.mp4",
    "autoplay": true
  }
}