Kik Integration with REST API

Create a bot API key

Each bot needs its own API key for tracking.

Create a bot to get an API key.

Integrate the REST API

There are two integration points as outlined below.

1. When Kik posts to your webhook endpoint

When Kik posts to your webhook endpoint, post the same data Kik sent to you to the following endpoint:

https://tracker.dashbot.io/track?platform=kik&v=11.1.0-rest&type=incoming&apiKey=<strong>API_KEY_HERE</strong>

Make sure to set the ‘Content-Type’ header to ‘application/json’

The data to POST should pass the following data:

{
  "apiKey": "<KIK_API_KEY>",
  "username": "<KIK_USERNAME>",
  "message": {
    "type": "text",
    "body": "Hello there!",
    "from": "someuser",
    "timestamp": 1610472907168,
    "mention": null,
    "participants": [
      "someuser"
    ],
    "readReceiptRequested": true,
    "id": "987654321",
    "chatId": "123456789"
  }
}

Sample cURL

curl -X POST -H "Content-Type: application/json"
     -d '{"apiKey":"<KIK_API_KEY>","username":"<KIK_USERNAME>","message":{"type":"text","body":"Hello there!","from":"someuser","timestamp":<span class="doctimestamp"></span><script>[].forEach.call(document.getElementsByClassName("doctimestamp"), function(el) { el.innerHTML=Date.now()});</script>,"mention":null,"participants":["someuser"],"readReceiptRequested":true,"id":"987654321","chatId":"123456789"}}'
     'https://tracker.dashbot.io/track?platform=kik&v=11.1.0-rest&type=incoming&apiKey=<strong>API_KEY_HERE</strong>'

Note
This is just an example — we accept any rich media that Kik accepts.

The KIK_API_KEY is the API_KEY from Kik and KIK_USERNAME is the username for the bot from Kik.

  1. When your bot sends a message to the Kik endpoint

When your bot sends a message, POST to the following endpoint:

https://tracker.dashbot.io/track?platform=kik&v=11.1.0-rest&type=outgoing&apiKey=<strong>API_KEY_HERE</strong>

Make sure to set the ‘Content-Type’ header to ‘application/json’

The data to POST should pass the following data:

{
  "apiKey": "<KIK_API_KEY>",
  "username": "<KIK_USERNAME>",
  "message": {
    "type": "text",
    "body": "Some sample text",
    "to": "someuser",
    "chatId": "123456789"
  }
}

Sample cURL

curl -X POST -H "Content-Type: application/json"
     -d '{"apiKey":"<KIK_API_KEY>","username":"<KIK_USERNAME>","message":{"type":"text","body":"Some sample text","to":"someuser","chatId":"123456789"}}'
     'https://tracker.dashbot.io/track?platform=kik&v=11.1.0-rest&type=outgoing&apiKey=<strong>API_KEY_HERE</strong>'

Note
This is just an example — we accept any rich media that Kik accepts.

The KIK_API_KEY is the API_KEY from Kik and KIK_USERNAME is the username for the bot from Kik.