To enable your Kore.ai Bot to communicate between your application servers and Kore.ai servers, you need to create and register an app in Kore.ai Bot Builder that specifies the callback URL for your application and generates the Client ID and Client Secret authentication tokens required for secure communications between your application and any Bots in your developer account.
This topic describes how to create an app and generate registration credentials when using the Kore.ai SDK.
To access webhooks and messages in Dialog tasks, you need to subscribe to an app for your bot. All messages from the bot and user are sent to the SDK as message events. When a Webhook node is defined in a Dialog task, the webhook event is sent to the SDK at runtime. You must install, host, and configure the Kore.ai SDK in your network to allow communications between the bot event messages and webhooks, and your application.
To create an app
- Select the Deploy tab from the top menu
- From the left menu click Integrations -> BotKit.
- The BotKit SDK page.
- On the BotKit SDK page, click the Add button next to the App Name drop-down list. The Create App dialog opens.
- In the App Name field, enter the name of the app registration, for example, TestApp, and then click Next.
- Once the App Created Successfully message appears, click Done.Â
- The following fields appear.
- The Client ID and Client Secret are generated
- In the Callback URL field displayed, enter the URL for your application that you want Kore.ai to push data to, for example, https://koremessenger.com/postURL.
- In the Events section, select one or more of:
- OnMessage – Triggers an event when a message from a user is received.
- OnHookNode – Triggers an event when a WebHook node is encountered in the Dialog task flow.
- onEvent – Triggers an event every time a Dialog or FAQ is finished.
- onAlert – Triggers an event when the user receives an alert message.
- onVariableUpdate – Triggers an event when the bot is published
- Click Save.
The new app registration along with credentials is displayed in the BotKit section.