{"id":18000,"date":"2017-08-08T18:12:11","date_gmt":"2017-08-08T18:12:11","guid":{"rendered":"http:\/\/developer.kore.ai\/v10-1\/?post_type=docs&#038;p=11765"},"modified":"2023-03-06T09:47:24","modified_gmt":"2023-03-06T09:47:24","slug":"installing-the-botkit-sdk","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/sdks\/installing-the-botkit-sdk\/","title":{"rendered":"Installing the BotKit SDK"},"content":{"rendered":"<p><span style=\"font-weight: 400\">The Kore.ai BotKit SDK runs as a Node.js application. You can add your own reverse proxy, firewall, and load balancer to meet your functional requirements for availability, scalability, and performance.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This section provides a high-level overview of BotKit SDK installation and configuration.<\/span><\/p>\n<p><span style=\"font-weight: 400\">For a detailed end-to-end tutorial on installation and setup using our Kore.ai Sample Assistants, see this <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/sdks\/kore-ai-botkit-sdk-tutorial\/\"><span style=\"font-weight: 400\">Kore.ai BotKit SDK Tutorial<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">To install the BotKit SDK, you will need to:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Register your application on the Kore.ai XO Platform by creating a Virtual Assistant, and then configuring it for the Web\/Mobile channel.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Download and deploy the BotKit SDK libraries.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Configure the <\/span><span style=\"font-weight: 400\">config.json<\/span><span style=\"font-weight: 400\"> file.<\/span><\/li>\n<\/ul>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Authorization\"><span style=\"font-weight: 400\">Authorization<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">As a prerequisite for BotKit SDK installation, you need to register your SDK app with the Kore.ai XO Platform, as follows.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In the XO Platform you need to create a bot, and then from API Extensions -&gt; BotKit SDK section,\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><strong>Deploy &gt; Integrations &gt; BotKit.<\/strong><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Register\/create an app for that assistant to generate the <\/span><strong>ClientID<\/strong><span style=\"font-weight: 400\"> and <\/span><strong>Client Secret<\/strong><span style=\"font-weight: 400\"> security credentials used for mutual SSL authentication for communication between your app and the XO Platform and to authorize API calls from your SDK to the Kore.ai XO Platform.\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">In the <\/span><span style=\"font-weight: 400\">config.json<\/span><span style=\"font-weight: 400\"> file in the SDK, you will need to copy the following authentication keys from the XO Platform.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">appId<\/span><span style=\"font-weight: 400\"> = ClientID<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">appKey<\/span><span style=\"font-weight: 400\"> \u2013 Client Secret<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">For more information, see <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/sdks\/sdk-app-registration\/\"><span style=\"font-weight: 400\">SDK App Registration<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Installation_and_Setup\"><span style=\"font-weight: 400\">Installation and Setup<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">The Kore.ai BotKit SDK libraries can be downloaded from the Github repository at:<\/span><\/p>\n<p><a href=\"https:\/\/github.com\/Koredotcom\/BotKit\"><span style=\"font-weight: 400\">https:\/\/github.com\/Koredotcom\/BotKit<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400\">To configure your SDK, you need to define the following keys in your <\/span><span style=\"font-weight: 400\">config.json<\/span><span style=\"font-weight: 400\"> file to get your BotKit up and running.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<p><strong>KEY<\/strong><\/p>\n<\/td>\n<td>\n<p><strong>DESCRIPTION<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">&#8220;server&#8221;: {<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u201cport\u201d:<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">Specifies the port to run the BotKit NodeJS app .<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">app&#8221;: {<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u201capiPrefix\u201d :<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">Specifies the API path prefix to the NodeJS express route.<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p><span style=\"font-weight: 400\">&#8220;credentials&#8221;: {<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u201cappId\u201d:<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<\/td>\n<td>\n<p><span style=\"font-weight: 400\">The Client ID value generated in Kore XO Platform when registering your SDK app.<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">Note that the JWT token would expire in 60 seconds, by default. You can change this using the following KoreConfig setting:<\/span><\/p>\n<p><span style=\"font-weight: 400\">&#8220;botkit&#8221;:{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;jwt_expiry&#8221;: 300 \/\/seconds<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0}<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">To run BotKit SDK, in a <\/span><strong>Terminal<\/strong><span style=\"font-weight: 400\"> window, enter:<\/span><\/p>\n<p><span style=\"font-weight: 400\">node app.js<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">Ensure that the node.js version is 10 or higher<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Kore.ai BotKit SDK runs as a Node.js application. You can add your own reverse proxy, firewall, and load balancer to meet your functional requirements for availability, scalability, and performance. This section provides a high-level overview of BotKit SDK installation and configuration. For a detailed end-to-end tutorial on installation and setup using our Kore.ai Sample&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-18000","post","type-post","status-publish","format-standard","hentry","category-sdks"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=18000"}],"version-history":[{"count":9,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18000\/revisions"}],"predecessor-version":[{"id":55430,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/18000\/revisions\/55430"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=18000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=18000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=18000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}