Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots
Kore.ai's Approach
Kore.ai Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Kore.ai Platform
How to Access Bot Builder
Working with Kore.ai Bot Builder
Building your first Bot
Getting Started with Building Bots
Using the Dialog Builder Tool
Creating a Simple Bot
Release Notes
Latest Updates
Older Releases
Bot Builder
Creating a Bot
Design
Develop
Dialog Task
Working with User Intent Node
Working with the Dialog Node
Working with Entity Node
Supported Entity Types
Working with Composite Entities
Supported Time Zones
Supported Colors
Supported Company Names
Working with Message Nodes
Working with the Confirmation Nodes
Working with Service Node
Implementing Custom Authentication
Enabling 2-way SSL for Service nodes
Working with Script Node
Working with Agent Transfer Node
Working with WebHook Node
Defining Connections & Transitions
Managing Dialogs
Prompt Editor
Action & Information Task
Working with Action Tasks
Working with Information Tasks
Establishing Flows
Alert Tasks
Working with Alert Tasks
Managing Ignore Words and Field Memory
Knowledge Graph
Terminology
Building Knowledge Graph
Generation of Knowledge Graph
Importing and Exporting Knowledge Graph
Knowledge Graph Analysis
Knowledge Extraction
Natural Language
Overview
Machine Learning
ML Model
Fundamental Meaning
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
NLP Settings and Guidelines
Bot Intelligence
Overview
Context Management
Session and Context Variables
Context Object
Dialog Management
Sub-Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talking to Bot
Utterance Testing
Batch Testing
Recording Conversations
Publishing your Bot
Analyzing your Bot
Overview
Dashboard
Custom Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Universal Bots
Defining
Creating
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
Travel Planning
Flight Search
Event Based Bot Actions
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Bot Management
Using Bot Variables
API Guide
API Overview
API List
API Collection
SDKs
SDK Overview
SDK Security
SDK App Registration
Kore.ai Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Web Socket Connect & RTM
Using the BotKit SDK
Installing the BotKit SDK
BotKit SDK Configuration
Events for the BotKit SDK
Functions for the BotKit SDK
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
Bot Administration
Bots Admin Console
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Enrollment
Inviting Users
Sending Bulk Invites to Enroll Users
Importing Users and User Data
Synchronizing Users from Active Directory
Security & Compliance
Overview
Using Single Sign-On
Cloud Connector
Analytics
Billing
How Tos
Context Switching
Using Traits
Live Agent Transfer
Schedule a Smart Alert
Configure Agent Transfer
Custom Dashboard
Patterns for Intents & Entities
Build Knowledge Graph
  1. Home
  2. Docs
  3. Bots
  4. API Guide
  5. Using Kore.ai APIs

Using Kore.ai APIs

Kore.ai Bots Platform provides access to bot development using secured APIs. All key developer activities like bot creation, bot import and export, training, and publishing are available using these APIs. Key account management activities like managing Bot Builder access, managing admin and bot roles can also be performed via secured public APIs. For a complete list of APIs and usage instructions refer here.

Authentication of the API requests involves the following two steps:

  1. Associate API Scopes to an App: As a first step to allow a client application to access the Bots Platform APIs, you need to associate the client app with the bot. You could create a new app or associate an existing app. As a part of creating the app, you need to select the API scopes for the App, which allows you to provide access to only the selected APIs to the app.
    • Bot Builder API Scopes: Bot developers can define bot specific API Scopes from the Bot Builder tool.
    • Bot Admin Console API Scopes: Account administrators can define API Scopes to access any of the bots built in their accounts from the Admin Console.
  2. Generating JWT token: To access Bot Platform’s public APIs, the application making the API request requires authentication. Kore.ai uses the JWT (JSON Web Token) mechanism to handle the authentication. For a quick overview of the JWT token, read Introduction to JWT tokens.
    Use the Client ID and Client Secret of the client app from above to generate a JWT token. This token needs to be passed as a part of each API request for authorization.

Associating API Scopes

Bot Builder

Following steps let you associate API Scopes to a Client App from the Bot Builder:

  1. Hover over the side-navigation panel of the bot and click API Extensions.
  2. On the Apps & Agents page, click the API Scopes tab and then click New.
  3. On the New API Scope Mapping page, from the App drop-down list, select an existing client app for authentication. To create a new app, click the Manage Apps link.
  4. Once you select an app, the Client ID and Client Secret section appear. Copy the values.
  5. You can also use this screen to delete apps by using the trash icon against the respective app.
  6. Under the Scopes section, select the APIs for which you want the client app to have access. The apps cannot access the APIs that aren’t selected here.

NOTE: Once enabled, the API Scopes need to be Published. Follow the Publish procedure ensuring that the API Scopes are selected from the API Extensions option.

Bot Admin Console

Following steps let you associate API Scopes to a Client App from the Bot Admin Console:

  1. On the side-navigation panel of the Bots Admin homepage, click Security & Control > API Scopes.
  2. On the API Scopes page, click New.
  3. On the New API Scope Mapping page, from the App drop-down list, select an existing client app for authentication. To create a new app, click the Manage Apps link.
  4. Once you select an app, the Client ID and Client Secret section appear. Copy the values.
  5. You can also use this screen to delete apps by using the trash icon against the respective app.
  6. Under the Scopes section, select the APIs for which you want the client app to have access.

Generating JWT Token

Once you have associated the API scopes to a client app, you need to generate JWT token for API requests.

  1. Go to http://jwt.io and scroll down the page to the Decoded section.
  2. Replace the contents in the Payload box with the Client ID of the app copied in the previous section.

    Note: The Bot Builder validates the token only when it is generated exactly as “appId”. The platform doesn’t validate tokens generated with any other formats such as “App ID” “appid” or “app ID”.
  3. In the Verify Signature box, enter the Client Secret copied from the previous section in the box with the text your-256-bit-secret.
  4. Copy the generated JWT token from the Encoded section on the left.
  5. This token can be used to access the required API and it needs to be passed as a part of each API request for authorization.
  6. You can use the API Collection to test the APIs from your Postman setup. See here for more.
Menu