Kore.ai Web SDK v3 (XO11) – Everything You Need to Know!
The Kore.ai Web SDK v3 (XO11) is here, bringing enhanced flexibility and authentication mechanisms for integrating conversational AI into web applications. This post provides a comprehensive guide to setting up the SDK, handling authentication, and exploring framework-specific examples.
What is Kore.ai Web SDK v3 (XO11)?
Kore.ai’s Web SDK enables you to embed AI-powered bots into web applications seamlessly. The SDK supports various authentication mechanisms, UI customizations, and integration with Angular, React, and other frameworks.
NPM Package: kore-web-sdk
Latest Version: v3/11.10.1
Complete Documentation: Web SDK Docs
Setting Up Kore.ai Web SDK
To integrate the Kore.ai Web SDK into your application, follow these steps:
Install the Web SDK
You can install the Web SDK using npm:
npm install kore-web-sdk
Alternatively, you can include the SDK via a <script>
tag in your HTML:
<script src="https://cdn.jsdelivr.net/npm/kore-web-sdk@latest/dist/kore-web-sdk.min.js"></script>
Setting Up JWT-Based Authentication
JWT (JSON Web Token) authentication is a secure way to authenticate users in the Kore.ai Web SDK. You need a JWT server to generate authentication tokens for the SDK.
Guide to Setting Up JWT Server: Read here
Steps to Implement JWT Authentication:
- Set up a backend server to generate JWT tokens.
- Pass the generated JWT token to the Web SDK when initializing the bot.
Example of JWT Assertion in SDK Initialization:
const botOptions = {
koreAPIUrl: "https://bots.kore.ai/api",
JWTUrl: "https://yourserver.com/generateJWT",
clientId: "your-client-id",
botId: "your-bot-id",
};
KoreSDK.init(botOptions);
JWT Assertion Example Code: View example
Authentication in Kore.ai Web SDK
Kore.ai provides multiple authentication methods, such as:
Anonymous Authentication – Directly initializes the chat without user authentication.
JWT-Based Authentication – Secure token-based authentication for authorized users.
OAuth Authentication – Uses external identity providers for authentication.
Detailed Guide on Authentication: Read more
Framework-Specific Examples
The Web SDK v3 supports seamless integration with Angular, React, and custom implementations. Here are some ready-to-use examples:
React SDK Integration
React developers can easily integrate the SDK using the following repositories:
Basic React Example: View here
React Custom Template Example: View here
Advanced React Customizations: View here
Angular SDK Integration
For Angular applications, Kore.ai provides the following implementations:
Basic Angular Example: View here
Angular Custom Template Example: View here
Embedding the SDK in Web & Mobile Applications
If you prefer to embed the bot using a script instead of using the SDK package, Kore.ai provides a way to do so via the web/mobile channel embed script.
Guide on Embedding via Script: Read here
Key Highlights of Kore.ai Web SDK v3 (XO11)
Supports JWT Authentication for secure communication.
Multiple Integration Methods – SDK-based, Script-based, and Custom Implementations.
Framework-Specific Examples – Angular & React support out-of-the-box.
Extensive Documentation & Support for faster implementation.
Have Questions? Let’s Discuss!
If you have any questions, feedback, or need help with implementation, feel free to drop a comment below!