npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rn-kore-bot-socket-lib

v0.0.5

Published

Description of Bot Scocket SDK library

Readme

Kore.ai SDK

Kore.ai offers Bots SDKs as a set of platform-specific client libraries that provide a quick and convenient way to integrate Kore.ai Bots chat capability into custom applications.

With just few lines of code, you can embed our Kore.ai chat widget into your applications to enable end-users to interact with your applications using Natural Language. For more information, refer to https://developer.kore.com/docs/bots/kore-web-sdk/

Kore.ai react-native socket SDK for developers

Kore.ai SDK for react-native enables you to talk to Kore.ai bots over a web socket. This repo also comes with the code for sample application that developers can modify according to their Bot configuration.

Supported react-native versions

1.For react-native versions 0.69.8 & above 2.For react-native expo version 50.0.0 & above

Setting up

Prerequisites

  • Service to generate JWT (JSON Web Tokens)- this service will be used in the assertion function injected to obtain the connection.

  • SDK app credentials

  • Login to the Bots platform

    • Navigate to the Bot builder
    • Search and click on the bot
    • Enable Web / Mobile Client channel against the bot as shown in the screen below.

    Add bot to Web/Mobile Client channel

    • create new or use existing SDK app to obtain client id and client secret

    Obtain Client id and Client secret

Instructions

Configuration changes

  • Setting up clientId, clientSecret, botId, botName and identity in BotConfig.tsx file

Client id - Copy this id from Bot Builder SDK Settings ex. cs-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Client secret - copy this value from Bot Builder SDK Settings ex. WibnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=

User identity - This should represent the subject for JWT token that could be an email or phone number in case of known user. In case of anonymous user, this can be a randomly generated unique id.

Bot name - copy this value from Bot Builder -> Channels -> Web/Mobile SDK config ex. "Demo Bot".

Bot Id - copy this value from Bot Builder -> Channels -> Web/Mobile SDK config ex. st-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXXX.

Server URL - replace it with your server URL, if required.

jwtServerUrl - replace it with your JWT server URL.

Anonymous user - if not anonymous, assign same identity (such as email or phone number) while making a connection.

JWT Server URL - specify the server URL for JWT token generation. This token is used to authorize the SDK client. Refer to documentation on how to setup the JWT server for token generation - e.g. https://jwt-token-server.example.com/

export const botConfig: BotConfigModel = {
 botName: 'Bot name here',
 botId: 'Bot id here',
 clientId: 'client id here',
 clientSecret: 'client secret here',
 jwtServerUrl : 'JWT server url here'
 botUrl: 'https://platform.kore.ai',//change url here
 identity: uuid.v4() + '',//change identity here
 isWebHook: false,// For now this should be always false as web hook support is not yet available in react-native sdk
 isHeaderVisible: true,
 isFooterVisible: true
};

Running the Demo app

  • Download the cli/expo sample from RNBotsSDK->Samples.

  • npm install --legacy-peer-deps

  • Run Android app

    CLI - npx react-native run-android
    Expo - npm expo start
    	  
  • Run iOS app

    ios/pod install
    
    CLI - npx react-native run-ios
    Expo - npm expo start

How to integrate react-native BotSDK socket module through npm

  1. Add below npm module to your app's package.json
    "rn-kore-bot-socket-lib": "^0.0.1",
  1. Import KoreBotClient and use as shown below
import KoreBotClient,{ConnectionState,RTM_EVENT} from 'rn-kore-bot-socket-lib';
.......
.......
# Initiate Connection
KoreBotClient.getInstance().initializeBotClient(botConfig);

# Connection status and sending message
KoreBotClient.getInstance().getEmitter()
    .once(RTM_EVENT.CONNECTING, () => {
      console.log('Connecting....');
    });

KoreBotClient.getInstance().getEmitter()
    .once(RTM_EVENT.ON_OPEN, () => {
      console.log('On connection open', RTM_EVENT.ON_OPEN);
    });

KoreBotClient.getInstance().getEmitter()
    .on(RTM_EVENT.ON_DISCONNECT, () => {
      console.log(
        'On connection disconnect',
        RTM_EVENT.ON_DISCONNECT,
      );
    });
KoreBotClient.getInstance().getEmitter()
	.on(RTM_EVENT.ON_MESSAGE,(data) =>{
      console.log('The response is :',JSON.stringify(data));
    })
if(KoreBotClient.getInstance().getConnectionState() === ConnectionState.CONNECTED){
        KoreBotClient.getInstance().sendMessage(text);
    }

License Copyright © Kore, Inc. MIT License; see LICENSE for further details.