{"id":1806,"date":"2025-11-28T22:40:03","date_gmt":"2025-11-28T22:40:03","guid":{"rendered":"https:\/\/devad.io\/guides\/?p=1806"},"modified":"2026-01-28T18:21:50","modified_gmt":"2026-01-28T18:21:50","slug":"x-twitter-ai-agent-chatbot-setup","status":"publish","type":"post","link":"https:\/\/devad.io\/guides\/chat-devad-io-docs\/x-twitter-ai-agent-chatbot-setup\/","title":{"rendered":"X (Twitter) AI Agent &amp; Chatbot Setup"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"twitter-ai-agent-chatbot-setup\">Twitter AI Agent &amp; Chatbot Setup<\/h2>\n\n\n\n<p>Integrating X.com DM chat (Twitter) allows you to receive Direct Messages (DMs) directly into your chat dashboard and reply using AI agents or human support. Follow the steps below to configure the Twitter Developer portal and synchronize it with your system.<\/p>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<h2 class=\"wp-block-heading\" id=\"twitter-installation-process\">Installation Process<\/h2>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-14ad114\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><div class=\"gs-numhead__circle\"><span>1<\/span><\/div><\/div><h2 id=\"gspb_heading-id-gsbp-14ad114\" class=\"gspb_heading gspb_heading-id-gsbp-14ad114 \">Create Twitter App<span class=\"gspb_heading_subtitle\"><\/span><\/h2><\/div>\n\n\n\n<p>Register at the <a href=\"https:\/\/developer.twitter.com\">Twitter Developer Portal<\/a>. <strong>Important:<\/strong> You must verify your phone number at <code>twitter.com\/settings\/phone<\/code> before starting, or registration will fail. Create your first app, then copy the <strong>API Key<\/strong> (Consumer Key) and <strong>API Key Secret<\/strong> (Consumer Secret). Paste these into <em>Settings &gt; Twitter<\/em>.<\/p>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-18a3468\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><div class=\"gs-numhead__circle\"><span>2<\/span><\/div><\/div><h2 id=\"gspb_heading-id-gsbp-18a3468\" class=\"gspb_heading gspb_heading-id-gsbp-18a3468 \">Request Elevated Access<span class=\"gspb_heading_subtitle\"><\/span><\/h2><\/div>\n\n\n\n<p>Apply for Elevated access via the products portal. Fill out the application form with the following details:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use Case:<\/strong> &#8220;I need access to the Account Activity API to start receiving Twitter Direct Messages to my chat software (CHAT.devad.io) and to reply to them directly from CHAT.devad.io, details at https:\/\/chat.devad.io\/twitter.&#8221;<\/li>\n\n\n\n<li><strong>Other Fields:<\/strong> Select <strong>No<\/strong> for all other questions regarding data analysis, tweet display, or government entities.<\/li>\n<\/ul>\n\n\n\n<p>Wait for email confirmation from Twitter approving your access level.<\/p>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-5159721\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><div class=\"gs-numhead__circle\"><span>3<\/span><\/div><\/div><h2 id=\"gspb_heading-id-gsbp-5159721\" class=\"gspb_heading gspb_heading-id-gsbp-5159721 \">Setup Dev Environment<span class=\"gspb_heading_subtitle\"><\/span><\/h2><\/div>\n\n\n\n<p>Once approved, go to the Developer Dashboard &gt; Products &gt; Premium &gt; Dev Environments. Under &#8220;Account Activity API \/ Sandbox,&#8221; click <strong>Set up dev environment<\/strong>. Label it <code>sb<\/code> (or match the value in <em>Settings &gt; Twitter &gt; Synchronization &gt; Dev environment label<\/em>).<\/p>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-000113f\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><div class=\"gs-numhead__circle\"><span>4<\/span><\/div><\/div><h2 id=\"gspb_heading-id-gsbp-000113f\" class=\"gspb_heading gspb_heading-id-gsbp-000113f \">Configure Authentication<span class=\"gspb_heading_subtitle\"><\/span><\/h2><\/div>\n\n\n\n<p>In App Settings, navigate to &#8220;User authentication settings&#8221; and activate <strong>OAuth 1.0a<\/strong>. <br><strong>Permissions:<\/strong> Select &#8220;Read and write and Direct message&#8221;. <br><strong>Callback URL:<\/strong> Paste the URL provided in <em>Settings &gt; Twitter &gt; Get callback URL<\/em>. <br><strong>Website URL:<\/strong> Enter your own website URL.<\/p>\n\n\n\n<div class=\"gspb_heading_sep_gsbp-b9f305a\"><div class=\"gspb_heading_sep gspb_heading_sep_before\"><div class=\"gs-numhead__circle\"><span>5<\/span><\/div><\/div><h2 id=\"gspb_heading-id-gsbp-b9f305a\" class=\"gspb_heading gspb_heading-id-gsbp-b9f305a \">Generate Tokens &#038; Subscribe<span class=\"gspb_heading_subtitle\"><\/span><\/h2><\/div>\n\n\n\n<p>Go to &#8220;Keys and tokens&#8221;, generate your <strong>Access Token and Secret<\/strong>, and paste them into your chat settings. Enter your Twitter username (e.g., <code>chatdevad1<\/code> from your profile URL). Finally, save settings and click the <strong>Subscribe<\/strong> button in the admin area.<\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"important-usage-information\">Important Usage Information<\/h2>\n\n\n\n<div class=\"wp-block-greenshift-blocks-accordion gs-accordion gspb_accordion-id-gsbp-tw-info\" id=\"gspb_accordion-id-gsbp-tw-info\" itemscope itemtype=\"https:\/\/schema.org\/FAQPage\">\n<div class=\"wp-block-greenshift-blocks-accordionitem gs-accordion-item gspb_accordionitem-gsbp-tw-testing gsopen\" id=\"gspb_accordionitem-gsbp-tw-testing\" itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\"><div id=\"gs-trigger-gsbp-tw-info-0\" class=\"gs-accordion-item__title\" aria-expanded=\"true\" role=\"button\" tabindex=\"0\" aria-controls=\"gspb-accordion-item-content-gsbp-tw-testing\"><div class=\"gs-accordion-item__heading\">Testing Advice<\/div><meta itemprop=\"name\" content=\"Testing Advice\"\/><span class=\"iconfortoggle\"><span class=\"gs-iconbefore\"><\/span><span class=\"gs-iconafter\"><\/span><\/span><\/div><div aria-labelledby=\"gs-trigger-gsbp-tw-info-0\" class=\"gs-accordion-item__content\" itemscope itemprop=\"acceptedAnswer\" itemtype=\"https:\/\/schema.org\/Answer\" id=\"gspb-accordion-item-content-gsbp-tw-testing\" aria-hidden=\"false\"><div class=\"gs-accordion-item__text\" itemprop=\"text\">\n<p>Do not use the synced Twitter account to test sending messages. If you message yourself, you may receive duplicates. Always test by sending a DM from a <strong>different<\/strong> Twitter account.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-greenshift-blocks-accordionitem gs-accordion-item gspb_accordionitem-gsbp-tw-limits gsclose\" id=\"gspb_accordionitem-gsbp-tw-limits\" itemscope><div id=\"gs-trigger-gsbp-tw-info-1\" class=\"gs-accordion-item__title\" aria-expanded=\"false\" role=\"button\" tabindex=\"0\" aria-controls=\"gspb-accordion-item-content-gsbp-tw-limits\"><div class=\"gs-accordion-item__heading\">Messaging Limits<\/div><span class=\"iconfortoggle\"><span class=\"gs-iconbefore\"><\/span><span class=\"gs-iconafter\"><\/span><\/span><\/div><div aria-labelledby=\"gs-trigger-gsbp-tw-info-1\" class=\"gs-accordion-item__content\" itemscope id=\"gspb-accordion-item-content-gsbp-tw-limits\" aria-hidden=\"true\"><div class=\"gs-accordion-item__text\">\n<p>When a user messages you, you can send up to <strong>5 response messages<\/strong> within a 24-hour window. After 24 hours, the session closes, and you cannot send further messages until the user replies again.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-greenshift-blocks-accordionitem gs-accordion-item gspb_accordionitem-gsbp-tw-rich gsclose\" id=\"gspb_accordionitem-gsbp-tw-rich\" itemscope><div id=\"gs-trigger-gsbp-tw-info-2\" class=\"gs-accordion-item__title\" aria-expanded=\"false\" role=\"button\" tabindex=\"0\" aria-controls=\"gspb-accordion-item-content-gsbp-tw-rich\"><div class=\"gs-accordion-item__heading\">Rich Messages &#038; Attachments<\/div><span class=\"iconfortoggle\"><span class=\"gs-iconbefore\"><\/span><span class=\"gs-iconafter\"><\/span><\/span><\/div><div aria-labelledby=\"gs-trigger-gsbp-tw-info-2\" class=\"gs-accordion-item__content\" itemscope id=\"gspb-accordion-item-content-gsbp-tw-rich\" aria-hidden=\"true\"><div class=\"gs-accordion-item__text\">\n<p>You can send a maximum of 3 or 4 attachments depending on media type. Note that advanced rich messages like <strong>Image Sliders<\/strong>, <strong>Sliders<\/strong>, and <strong>Cards<\/strong> are NOT supported on Twitter.<\/p>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-greenshift-blocks-accordionitem gs-accordion-item gspb_accordionitem-gsbp-tw-ai gsclose\" id=\"gspb_accordionitem-gsbp-tw-ai\" itemscope><div id=\"gs-trigger-gsbp-tw-info-3\" class=\"gs-accordion-item__title\" aria-expanded=\"false\" role=\"button\" tabindex=\"0\" aria-controls=\"gspb-accordion-item-content-gsbp-tw-ai\"><div class=\"gs-accordion-item__heading\">AI &#038; Chatbot Features<\/div><span class=\"iconfortoggle\"><span class=\"gs-iconbefore\"><\/span><span class=\"gs-iconafter\"><\/span><\/span><\/div><div aria-labelledby=\"gs-trigger-gsbp-tw-info-3\" class=\"gs-accordion-item__content\" itemscope id=\"gspb-accordion-item-content-gsbp-tw-ai\" aria-hidden=\"true\"><div class=\"gs-accordion-item__text\">\n<p>The integration fully supports the AI Chatbot and <strong>Human Takeover<\/strong> features. Supported AI capabilities include language detection, spelling correction, multilingual translation, and Google search.<\/p>\n<\/div><\/div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Twitter AI Agent &amp; Chatbot Setup Integrating X.com DM chat (Twitter) allows you to receive Direct Messages (DMs) directly into your chat dashboard and reply&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"#gspb_accordion-id-gsbp-tw-info .gs-accordion-item.gsclose>.gs-accordion-item__content{overflow:hidden;opacity:0}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item.gsopen>.gs-accordion-item__content{opacity:1;max-height:5000px}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__title>.gs-accordion-item__heading{outline:0;text-decoration:none;margin:0!important;padding:0!important;flex-grow:1}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__title{z-index:1;margin:0;cursor:pointer;transition:all .3s ease-in-out;position:relative;display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__content{z-index:0;position:relative;max-height:0;will-change:max-height;transition:all .25s ease-out}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__content,#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__title{background-color:#f9f9f9;border-style:solid;border-width:1px;border-color:var(--wp--preset--color--border, #00000012)}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__content{background-color:#fff;border-top-color:#00000000}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__title span.iconfortoggle{margin-left:15px;display:inline-block;height:14px;width:14px;position:relative}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item{margin-bottom:10px}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__content>.gs-accordion-item__text,#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__title{padding:15px 20px}#gspb_accordion-id-gsbp-tw-info .gs-accordion-item>.gs-accordion-item__title{text-align:center}.gs-accordion .gs-accordion-item.gsopen .gs-accordion-item__title .gs-iconafter{transform:rotate(0)}.gs-accordion .gs-accordion-item__title span.iconfortoggle .gs-iconafter,.gs-accordion .gs-accordion-item__title span.iconfortoggle .gs-iconbefore{content:'';width:14px;height:2px;border-radius:2px;background-color:#111;position:absolute;top:6px;left:0}.gs-accordion .gs-accordion-item__title span.iconfortoggle .gs-iconafter{transform:rotate(90deg);transition:all .3s ease-in-out}#gspb_heading-id-gsbp-14ad114{margin-top:0;margin-bottom:0}.gspb_heading_sep_gsbp-000113f,.gspb_heading_sep_gsbp-14ad114,.gspb_heading_sep_gsbp-18a3468,.gspb_heading_sep_gsbp-5159721,.gspb_heading_sep_gsbp-b9f305a{display:flex;align-items:center}.gspb_heading_sep_gsbp-14ad114>.gspb_heading_sep{width:40px}.gspb_heading_sep_gsbp-14ad114 .gs-numhead__circle{border:3px solid #2184f9;border-radius:50%;box-sizing:content-box;display:inline-block;font-weight:700;text-align:center;overflow:hidden;color:#2184f9;width:calc(40px - 6px);min-width:calc(40px - 6px);height:calc(40px - 6px);line-height:calc(40px - 6px);font-size:24px}.gspb_heading_sep_gsbp-14ad114 .gspb_heading_sep_before{margin-right:17px}#gspb_heading-id-gsbp-14ad114 .gspb_heading_subtitle,#gspb_subheading-id-gsbp-14ad114{display:block;font-size:17px;line-height:22px;font-weight:400!important;margin-top:2px}#gspb_heading-id-gsbp-18a3468{margin-top:0;margin-bottom:0}.gspb_heading_sep_gsbp-18a3468>.gspb_heading_sep{width:40px}.gspb_heading_sep_gsbp-18a3468 .gs-numhead__circle{border:3px solid #2184f9;border-radius:50%;box-sizing:content-box;display:inline-block;font-weight:700;text-align:center;overflow:hidden;color:#2184f9;width:calc(40px - 6px);min-width:calc(40px - 6px);height:calc(40px - 6px);line-height:calc(40px - 6px);font-size:24px}.gspb_heading_sep_gsbp-18a3468 .gspb_heading_sep_before{margin-right:17px}#gspb_heading-id-gsbp-18a3468 .gspb_heading_subtitle,#gspb_subheading-id-gsbp-18a3468{display:block;font-size:17px;line-height:22px;font-weight:400!important;margin-top:2px}#gspb_heading-id-gsbp-5159721{margin-top:0;margin-bottom:0}.gspb_heading_sep_gsbp-5159721>.gspb_heading_sep{width:40px}.gspb_heading_sep_gsbp-5159721 .gs-numhead__circle{border:3px solid #2184f9;border-radius:50%;box-sizing:content-box;display:inline-block;font-weight:700;text-align:center;overflow:hidden;color:#2184f9;width:calc(40px - 6px);min-width:calc(40px - 6px);height:calc(40px - 6px);line-height:calc(40px - 6px);font-size:24px}.gspb_heading_sep_gsbp-5159721 .gspb_heading_sep_before{margin-right:17px}#gspb_heading-id-gsbp-5159721 .gspb_heading_subtitle,#gspb_subheading-id-gsbp-5159721{display:block;font-size:17px;line-height:22px;font-weight:400!important;margin-top:2px}#gspb_heading-id-gsbp-000113f{margin-top:0;margin-bottom:0}.gspb_heading_sep_gsbp-000113f>.gspb_heading_sep{width:40px}.gspb_heading_sep_gsbp-000113f .gs-numhead__circle{border:3px solid #2184f9;border-radius:50%;box-sizing:content-box;display:inline-block;font-weight:700;text-align:center;overflow:hidden;color:#2184f9;width:calc(40px - 6px);min-width:calc(40px - 6px);height:calc(40px - 6px);line-height:calc(40px - 6px);font-size:24px}.gspb_heading_sep_gsbp-000113f .gspb_heading_sep_before{margin-right:17px}#gspb_heading-id-gsbp-000113f .gspb_heading_subtitle,#gspb_subheading-id-gsbp-000113f{display:block;font-size:17px;line-height:22px;font-weight:400!important;margin-top:2px}#gspb_heading-id-gsbp-b9f305a{margin-top:0;margin-bottom:0}.gspb_heading_sep_gsbp-b9f305a>.gspb_heading_sep{width:40px}.gspb_heading_sep_gsbp-b9f305a .gs-numhead__circle{border:3px solid #2184f9;border-radius:50%;box-sizing:content-box;display:inline-block;font-weight:700;text-align:center;overflow:hidden;color:#2184f9;width:calc(40px - 6px);min-width:calc(40px - 6px);height:calc(40px - 6px);line-height:calc(40px - 6px);font-size:24px}.gspb_heading_sep_gsbp-b9f305a .gspb_heading_sep_before{margin-right:17px}#gspb_heading-id-gsbp-b9f305a .gspb_heading_subtitle,#gspb_subheading-id-gsbp-b9f305a{display:block;font-size:17px;line-height:22px;font-weight:400!important;margin-top:2px}","pgc_sgb_lightbox_settings":"","footnotes":"","_siteseo_titles_title":"","_siteseo_titles_desc":"","_siteseo_analysis_target_kw":"","_siteseo_robots_canonical":"","_siteseo_robots_index":"","_siteseo_robots_follow":"","_siteseo_robots_primary_cat":"","_siteseo_social_fb_title":"","_siteseo_social_fb_desc":"","_siteseo_social_fb_img":"","_siteseo_social_twitter_title":"","_siteseo_social_twitter_desc":"","_siteseo_social_twitter_img":""},"categories":[2,119],"tags":[],"class_list":["post-1806","post","type-post","status-publish","format-standard","hentry","category-chat-devad-io-docs","category-twitter-x"],"acf":[],"menu_order":0,"_links":{"self":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts\/1806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/comments?post=1806"}],"version-history":[{"count":2,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts\/1806\/revisions"}],"predecessor-version":[{"id":2467,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/posts\/1806\/revisions\/2467"}],"wp:attachment":[{"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/media?parent=1806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/categories?post=1806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devad.io\/guides\/wp-json\/wp\/v2\/tags?post=1806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}