{"id":17935,"date":"2016-11-29T20:34:00","date_gmt":"2016-11-29T20:34:00","guid":{"rendered":"https:\/\/developer.kore.com\/?post_type=docs&#038;p=9011"},"modified":"2023-02-15T09:23:08","modified_gmt":"2023-02-15T09:23:08","slug":"adding-the-twitter-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/channel-enablement\/adding-the-twitter-channel\/","title":{"rendered":"Adding the Twitter 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>To set up Twitter as a channel, you must associate the bot with a Twitter account, define a Twitter app, and enable the integration. To add Twitter as a channel, follow the below steps:<\/p>\n<ol>\n<li><b>Create Twitter App <\/b>&#8211; Log in to Twitter. In <em>Twitter App Management Console, <\/em>create an app to provide authorization for communication between Twitter and your Kore.ai bot.<\/li>\n<li><b>Setup Keys and Tokens<\/b> &#8211; Generate the authentication keys and tokens for the <em>Twitter<\/em> app to communicate with the Kore.ai Bots Platform, and then copy those keys and tokens to Kore.ai Bot Builder.<\/li>\n<li><b>Update Permissions<\/b> -To use <em>Twitter<\/em> as a channel for your Kore.ai bot, you must define the <em>Twitter<\/em> app permissions used to interact with the Kore.ai Bots Platform.<\/li>\n<li><b>Enable Channel <\/b>&#8211; After setting up the <em>Twitter<\/em> app and entering configuration data in Bot Builder, you must enable the channel.<\/li>\n<\/ol>\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<h2><span class=\"ez-toc-section\" id=\"Add_Twitter_Channel\">Add Twitter Channel<\/span><\/h2>\n<p>To complete this procedure, you must create a <em>Twitter<\/em> account if you do not have one already.<\/p>\n<p>Note: The steps are modified in v7.1 of the platform in sync with changes to the channel requirements.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Create_App\">Create App<\/span><\/h3>\n<ol>\n<li>To create a Twitter app, you need a Callback URL. To find the Callback URL, follow the below steps:<\/li>\n<\/ol>\n<ul>\n<li>In the Bots section of the Bot Builder, click the bot you want to add the Twitter channel to.<\/li>\n<li>On the Channels tab, click the <strong>Twitter<\/strong> icon. The Twitter Channel page is displayed.<\/li>\n<li>Use the <strong>Callback URL<\/strong> from the <strong>Configurations <\/strong>tab of Twitter channel page.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-message color_yellow\"><div class=\"w-message-body\"><p><b>Important<\/b>: The Callback URL now includes the <b><i>streamid<\/i><\/b> in the API request to identify the virtual assistant being accessed. When an incoming request is qualified with this identifier, it helps with traceability, troubleshooting, and remediation at the network level during anomalies like malicious calls or unusual bot activity.<\/p><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<ol start=\"2\">\n<li><a href=\"https:\/\/apps.twitter.com\/\">Log in<\/a> to Twitter apps portal and select <b>Create New App<\/b>.<\/li>\n<li>Provide all the required information, and click <b>Create your Twitter application<\/b> to create your new app.<b><br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/35\/Twitter-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22360\" src=\"\/wp-content\/uploads\/sites\/35\/Twitter-2.png\" alt=\"\" width=\"1366\" height=\"1842\" \/><\/a><\/b><\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Keys_Tokens\">Keys &amp; Tokens<\/span><\/h3>\n<p>After the application is created:<\/p>\n<ol>\n<li>Go to the <strong>Keys and tokens<\/strong> tab.<\/li>\n<li>Under the <strong>Access token &amp; access token secret<\/strong> section, click <strong>Create<\/strong>. This action generates the Access Token and Access Token Secret.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/35\/Twitter-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22361\" src=\"\/wp-content\/uploads\/sites\/35\/Twitter-4.png\" alt=\"\" width=\"1338\" height=\"631\" \/><\/a><\/li>\n<li>Copy the values of <strong>API Key<\/strong>, <strong>API Secret Key<\/strong>, <strong>Access Token<\/strong>, and <strong>Access Token Secret<\/strong> fields. You must provide them while configuring the Twitter channel\u00a0 from the Bot Builder for the respective bot.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Permissions\">Permissions<\/span><\/h3>\n<ol>\n<li>Go to <b>Permissions<\/b> tab; click the <strong>Edit <\/strong>and set the <strong>Access Permission <\/strong>to <em>Read, Write, and Direct Messages<\/em>.<\/li>\n<li>Click <strong>Save<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/35\/Twitter-5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22362\" src=\"\/wp-content\/uploads\/sites\/35\/Twitter-5.png\" alt=\"\" width=\"1344\" height=\"674\" \/><\/a><\/li>\n<li>Go to the <strong>Dev environments<\/strong> page and set up the environment for your app.<\/li>\n<li>Click <strong>Set up dev environment<\/strong> under the <strong>Account Activity API<\/strong> section. Provide a value for <strong>Dev environment label<\/strong>, say <em>ProductionEnvironment<\/em>, and choose your app.<\/li>\n<li>Click <strong>Complete setup<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/35\/Twitter-6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22363\" src=\"\/wp-content\/uploads\/sites\/35\/Twitter-6.png\" alt=\"\" width=\"697\" height=\"375\" \/><\/a><\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Enable_Channel\">Enable Channel<\/span><\/h2>\n<ol>\n<li>In the <b>Bots<\/b> section of the Bot Builder, click the bot you want to add the Twitter channel to.<\/li>\n<li>On the <b>Channels<\/b> tab, click the <b>Twitter <\/b>icon. The <b>Twitter Channel<\/b> page is displayed.<\/li>\n<li>Go to <strong>Configurations<\/strong> tab.<\/li>\n<li>Enter the <strong>API key<\/strong>, <strong>API Secret Key<\/strong>, <strong>Access Token<\/strong>, and <strong>Access Token Secret<\/strong> obtained from the <a href=\"#Keys_Tokens\">Keys and Tokens<\/a> tab of your Twitter app.<\/li>\n<li>Enter the\u00a0<strong>Environment Label<\/strong> as set up in the <a href=\"#Permissions\">Permissions<\/a> section of the Twitter app.<\/li>\n<li>Click <strong>Authorize<\/strong> to register a webhook with your Twitter app and to subscribe to realtime activities.<\/li>\n<li><strong>Enable Channel<\/strong> and\u00a0<strong>Save<\/strong>.<\/li>\n<li>Your Twitter channel is set up and ready for <a href=\"\/docs\/bots\/publish\/publishing-bot\/\">Publishing your Bot<\/a>.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Edit_Twitter_Channel\">Edit Twitter Channel<\/span><\/h2>\n<p>To edit the Twitter channel, follow the below steps:<\/p>\n<ol>\n<li>Hover over the channel and click to modify.<\/li>\n<li>You can make necessary updates to your channel configurations and save them.<\/li>\n<li>You can also disable or delete the channel information by clicking the <b>Settings <\/b>icon.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/35\/edit-twitter.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-14164 alignnone\" src=\"\/wp-content\/uploads\/sites\/35\/edit-twitter.png\" alt=\"\" width=\"688\" height=\"324\" \/><\/a><br \/>\nSelect one of the following commands to modify the channel:<\/li>\n<\/ol>\n<ul>\n<li><b>Disable\/Enable<\/b> &#8211; Click <b>Disable<\/b> to temporarily disable the use of the Twitter channel for your bot. To enable use of the Twitter, click <b>Enable<\/b>.<\/li>\n<li><b>Delete<\/b> &#8211; Click <b>Delete<\/b>. On the <b>Delete Confirmation<\/b> dialog box, click <b>OK<\/b> to permanently delete the bot channel configuration.<\/li>\n<\/ul>\n<div class=\"alert alert-warning\">Warning: This operation is permanent, and cannot be undone.<\/div>\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":"To set up Twitter as a channel, you must associate the bot with a Twitter account, define a Twitter app, and enable the integration. To add Twitter as a channel, follow the below steps: Create Twitter App - Log in to Twitter. In Twitter App Management Console, create an app to provide authorization for communication...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-17935","post","type-post","status-publish","format-standard","hentry","category-channel-enablement"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/17935","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=17935"}],"version-history":[{"count":11,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/17935\/revisions"}],"predecessor-version":[{"id":54230,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/17935\/revisions\/54230"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=17935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=17935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=17935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}