{"id":18154,"date":"2019-03-14T09:33:31","date_gmt":"2019-03-14T09:33:31","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-1\/?post_type=docs&#038;p=17368"},"modified":"2019-05-29T12:36:06","modified_gmt":"2019-05-29T11:36:06","slug":"adding-the-mattermost-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-1\/docs\/bots\/channel-enablement\/adding-the-mattermost-channel\/","title":{"rendered":"Adding the Mattermost Channel"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>You can connect Kore.ai bots to your Mattermost account using either:<br \/>\n(NOTE: Before you begin, ensure that you have access to the administrative functions of your Mattermost account)<\/p>\n<ul>\n<li><a href=\"#webhook-integration\">Webhook based integration<\/a> or<\/li>\n<li><a href=\"#websocket-integration\">WebSocket based integration<\/a>.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\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>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3 id=\"webhook-integration\"><span class=\"ez-toc-section\" id=\"WebHook_based_Integration\">WebHook based Integration<\/span><\/h3>\n<h4>Step 1: Setup Outgoing Webhook<\/h4>\n<ul>\n<li>Login to your Mattermost account<\/li>\n<li>From the \u2018<strong>Main Menu<\/strong>\u2019 (hamburger menu from the left panel) choose \u2018<strong>Integrations<\/strong>\u2019.<\/li>\n<li>Select the \u2018<strong>Outgoing Webhooks<\/strong>\u2019 menu and click \u2018<strong>Add Outgoing Webhook<\/strong>\u2019.<\/li>\n<li>Provide required information as per the below image.\n<ul>\n<li>Enter your preferred values for Title, Description and Bot Name fields.<\/li>\n<li>Choose \u2018application\/json\u2019 as Content Type.<\/li>\n<li>If you would like your bot to be available only for a specific channel, then choose the required channel from the Channel dropdown.<\/li>\n<li>Provide your Kore.ai bot\u2019s Bot Name in the Trigger Words field.<\/li>\n<li>Copy the Callback URL for the Kore bot (located in the \u2018Configurations\u2019 tab of Mattermost\u00a0Channel enablement) and provide it in the \u2018Callback URLs\u2019 field.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17369\" src=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH1.png\" alt=\"\" width=\"820\" height=\"824\" \/><\/a><\/li>\n<li>Click on \u2018Save\u2019 to complete the Outgoing Webhook setup.<\/li>\n<li>You would be redirected to the confirmation page with the Token displayed.<\/li>\n<li>Copy this Token and provide it in the \u2018Outgoing Webhook Token\u2019 field present in the Kore Bot Channel Configurations section.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17368\" src=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH2.png\" alt=\"\" width=\"820\" height=\"248\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Step 2: Setup Incoming Webhook<\/h4>\n<ul>\n<li>Select \u2018<strong>Incoming Webhooks<\/strong>\u2019 menu and click \u2018<strong>Add Incoming Webhook<\/strong>\u2019.<\/li>\n<li>Provide required information as per the below image.\n<ul>\n<li>Enter your preferred values for Title, Description and Username fields.<\/li>\n<li>Choose a default channel. Kore.ai bots always respond back in the channel from which the user input is received.<\/li>\n<li>Do not select the \u2018Lock to this channel\u2019 option.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17367\" src=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH3.png\" alt=\"\" width=\"820\" height=\"528\" \/><\/a><\/li>\n<li>Click on \u2018Save\u2019 to complete the Incoming Webhook setup.<\/li>\n<li>You would be redirected to the confirmation page along with the URL associated with this newly created incoming webhook.<\/li>\n<li>Copy this URL and provide it in the \u2018Incoming Webhook URL\u2019 field in the Kore Bot Channel Configurations section.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17366\" src=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WH4.png\" alt=\"\" width=\"820\" height=\"208\" \/><\/a><\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\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>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3 id=\"websocket-integration\"><span class=\"ez-toc-section\" id=\"WebSocket_based_Integration\">WebSocket\u00a0based Integration<\/span><\/h3>\n<h4>Step 1: Enable Personal Access Tokens<\/h4>\n<p>To enable WebSocket connection, you would need to create a Mattermost account to be provisioned as a bot.<\/p>\n<ul>\n<li>First, enable usage of Personal Access Tokens to allow your Mattermost users to generate personal access tokens.<\/li>\n<li>Personal access tokens are used to authenticate and provide full access to an account.\n<ul>\n<li>Login to Mattermost from an account which has access to \u2018System Console\u2019.<\/li>\n<li>From \u2018System Console\u2019, navigate to \u2018Integrations &#8211; Custom Integrations\u2019 menu.<\/li>\n<li>Locate the \u2018Enable Personal Access Tokens\u2019 setting, set it to \u2018true\u2019 and save.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WS1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17365\" src=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WS1.png\" alt=\"\" width=\"820\" height=\"340\" \/><\/a><\/p>\n<h4>Step 2: Create an Account to be Provisioned as a Bot<\/h4>\n<ul>\n<li>Create a new account you intend to be presented as a bot for your Mattermost users.<\/li>\n<li>Login to this new account and navigate to \u2018Account Settings &#8211; Security\u2019 section.\n<ul>\n<li>Click on \u2018Personal Access Tokens\u2019 section and click \u2018Create New Token\u2019.<\/li>\n<li>Provide a description for your token and \u2018Save\u2019.<\/li>\n<\/ul>\n<\/li>\n<li>Post-confirmation, you will be presented with the access token.<\/li>\n<li>Make a note of the \u2018Access Token\u2019 and provide it in the Kore Bot Channel Configurations section.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WS2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17364\" src=\"\/wp-content\/uploads\/sites\/12\/Mattermost_WS2.png\" alt=\"\" width=\"790\" height=\"554\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\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><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"You can connect Kore.ai bots to your Mattermost account using either: (NOTE: Before you begin, ensure that you have access to the administrative functions of your Mattermost account) Webhook based integration or WebSocket based integration. WebHook based Integration Step 1: Setup Outgoing Webhook Login to your Mattermost account From the \u2018Main Menu\u2019 (hamburger menu from...","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-18154","post","type-post","status-publish","format-standard","hentry","category-channel-enablement"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/18154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/comments?post=18154"}],"version-history":[{"count":3,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/18154\/revisions"}],"predecessor-version":[{"id":21286,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/18154\/revisions\/21286"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/media?parent=18154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/categories?post=18154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/tags?post=18154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}