Skip to main content
Back to BotKit SDK Overview The BotKit SDK runs as a Node.js application. You can add a reverse proxy, firewall, and load balancer to meet your availability, scalability, and performance requirements. For a full end-to-end tutorial, see BotKit SDK Tutorial — Flight Search.

Prerequisites

Register your app on the Platform to get authentication credentials:
  1. Go to Deploy > Integrations > BotKit.
  2. Create or register an app for your bot to generate Client ID and Client Secret.
Copy these values into your config.json:
  • appId → Client ID
  • appKey → Client Secret
See SDK App Registration for details.

Download and Install

Download the BotKit SDK from GitHub:
https://github.com/Koredotcom/BotKit

Configure config.json

Set the following keys in config.json:
KeyDescription
server.portPort for the BotKit Node.js app (default: 8003)
app.apiPrefixAPI path prefix for the Express route (empty in sample code)
app.urlngrok forwarding URL or your callback server URL
validations.leastNodeVersionMinimum Node.js version — must be 10 or higher
credentials.apikeyClient Secret from the Platform
credentials.appIdClient ID from the Platform
credentials.st-<botId>.apikeyPer-bot override for Client Secret (falls back to parent if absent)
credentials.st-<botId>.appIdPer-bot override for Client ID
jwt.jwtAlgorithmJWT signing algorithm: HS256, HS512, RS256, or RS512 (default: HS256)
jwt.jwt-expiryJWT expiry in seconds (default: 60)
jwt.st-<botId>Per-bot JWT algorithm and expiry overrides
redis.options.hostRedis host (default: localhost)
redis.options.portRedis port (default: 6379)
redis.availableSet true to enable Redis for async webhook payload storage
examples.mockServicesHostHost for mock services used in testing
liveagentlicenseLiveChat license key for agent transfer integrations
supportsMessageAckSet true to enable message acknowledgment
languagesList of supported language codes, for example, ["en", "de"]
Example config.json:
{
  "server": { "port": 8003 },
  "app": {
    "apiPrefix": "",
    "url": "https://your-ngrok-url.ngrok-free.app"
  },
  "validations": { "leastNodeVersion": 10 },
  "credentials": {
    "apikey": "your-client-secret",
    "appId": "cs-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "st-67890": {
      "apikey": "bot-specific-secret",
      "appId": "bot-specific-client-id"
    }
  },
  "jwt": {
    "jwtAlgorithm": "HS256",
    "jwt-expiry": 60,
    "st-67890": {
      "jwtAlgorithm": "HS512",
      "jwt-expiry": 60
    }
  },
  "redis": {
    "options": { "host": "localhost", "port": 6379 },
    "available": false
  },
  "examples": { "mockServicesHost": "https://localhost:8004" },
  "liveagentlicense": "your-livechat-license",
  "supportsMessageAck": true,
  "languages": ["en", "de"]
}
The default JWT token expiry is 60 seconds. Override with the KoreConfig setting:
"botkit": { "jwt_expiry": 300 }

Run the SDK

In a Terminal window, navigate to your BotKit SDK folder and run:
node app.js
Requires Node.js version 10 or higher.