Kik Integration with 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')(process.env.DASHBOT_API_KEY).kik;

Configure Dashbot handler and add to Kik Bot

Pass the bot handle created with the Kik npm module to Dashbot.

const Bot = require('@kikinteractive/kik');
const bot = new Bot({
  username: process.env.KIK_USERNAME,
  apiKey: process.env.KIK_API_KEY,
  baseUrl: process.env.KIK_WEBHOOK_URL
});
bot.updateBotConfiguration();
dashbot.configHandler(bot);
bot.use(dashbot.logHandler);

Example

View sample code for a Kik Bot.

Close Menu