Documentation

Kik Integration without Kik NPM

Create a bot API key

Each bot needs its own API key for tracking.

Create a bot to get an API key.

Install Dashbot via NPM

npm install --save dashbot

Include Dashbot

Use the API key created above.

const dashbot = require('dashbot')(<strong>process.env.DASHBOT_API_KEY</strong>).kik;

Log all incoming messages

Send the full message to Dashbot.

Example Message

{
"type": "text",
"body": "pat me",
"from": "someuser",
"timestamp": 1470024587572,"<br></br>" "mention": null,
"participants": [
"someuser"
],
"readReceiptRequested": true,
"id": "987654321",
"chatId": "123456789"
}

Send Message

dashbot.logIncoming(process.env.KIK_API_KEY, process.env.KIK_USERNAME, message)

Where process.env.KIK_API_KEY is the API_KEY from Kik and process.env.KIK_USERNAME is the username for the bot from Kik.

Log all outgoing messages

Send the full message to Dashbot.

Example Message

{
"type": "text",
"body": "My Test Message",
"to": "someuser",
"chatId": "123456789"
}

Send Message

dashbot.logOutgoing(process.env.KIK_API_KEY, process.env.KIK_USERNAME, message)

Where process.env.KIK_API_KEY is the API_KEY from Kik and process.env.KIK_USERNAMEis the username for the bot from Kik.