	{"id":930,"date":"2023-05-05T09:50:20","date_gmt":"2023-05-05T01:50:20","guid":{"rendered":"https:\/\/manychat.com.hk\/?post_type=docs&#038;p=930"},"modified":"2023-05-05T09:51:13","modified_gmt":"2023-05-05T01:51:13","password":"","slug":"%e3%80%90%e9%96%8b%e7%99%bc%e5%b7%a5%e5%85%b7%e3%80%91%e5%a4%96%e9%83%a8%e8%ab%8b%e6%b1%82","status":"publish","type":"docs","link":"https:\/\/manychat.com.hk\/en\/docs\/%E9%96%8B%E7%99%BC%E5%B7%A5%E5%85%B7%E5%A4%96%E9%83%A8%E8%AB%8B%E6%B1%82\/","title":{"rendered":"[Development Tools] External Requests"},"content":{"rendered":"<p><span>The development tools provide greater flexibility when customizing bots - let\u2019s take a closer look at \u201cexternal requests\u201d in this article.&nbsp;<\/span><\/p>\n<p><strong><span>External Requests (PRO feature):<\/span><\/strong><\/p>\n<p><span>External requests are a new operation available in the builder.<\/span><br \/>\n<span>This feature allows you to send HTTP requests to the server using different types of data:<\/span><\/p>\n<ul>\n<li data-key=\"123\"><span>Subscriber status<\/span><\/li>\n<li data-key=\"123\"><span>Name<\/span><\/li>\n<li data-key=\"127\"><span>\u59d3<\/span><\/li>\n<li data-key=\"127\"><span>Name<\/span><\/li>\n<li data-key=\"131\"><span>gender<\/span><\/li>\n<li data-key=\"133\"><span>Language<\/span><\/li>\n<li data-key=\"133\"><span>Timezone<\/span><\/li>\n<li data-key=\"133\"><span>Instant messaging URL<\/span><\/li>\n<li data-key=\"133\"><span>Custom fields<\/span><\/li>\n<\/ul>\n<p><span>External request feature supports<\/span><strong><span>GET<\/span><\/strong><span>with<\/span><strong><span>POST<\/span><\/strong><span>&nbsp;HTTP methods. To create an external request node, you need to go to<\/span><strong><span>8. Actions<\/span><\/strong><span>&nbsp;-&gt;&nbsp;<\/span><strong><span>External Requests.<\/span><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"fr-dii aligncenter\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001251568\/original\/Sk974dY1gCIVHef_DDAbEcaaJhJXxB91Gg.png?1519127889\" width=\"522\" height=\"396\" data-filelink=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001251568\/original\/Sk974dY1gCIVHef_DDAbEcaaJhJXxB91Gg.png?1519127889\" data-fileid=\"36001251568\" data-uniquekey=\"1519127445936\"><\/p>\n<p><span>Click<\/span><strong><span>After adding your request<\/span><\/strong><span>button, it will open the configuration window.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"fr-dib fr-fil aligncenter\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001253330\/original\/xz3RT9U94o3oMX3oen8svBPopgb8HFIAnA.png?1519129831\" width=\"590\" height=\"370\" data-fileid=\"36001253330\" data-filelink=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001253330\/original\/xz3RT9U94o3oMX3oen8svBPopgb8HFIAnA.png?1519129831\" data-uniquekey=\"1519129590429\"><\/p>\n<p><span>In the configuration window, you will be able to select the request type (GET or POST).<\/span><\/p>\n<p><img decoding=\"async\" class=\"fr-dib fr-fil\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001253533\/original\/r14xpkbJ33bFnaD7ES-Q3yCEoNTgpjOyPg.png?1519129963\" data-filelink=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001253533\/original\/r14xpkbJ33bFnaD7ES-Q3yCEoNTgpjOyPg.png?1519129963\" data-fileid=\"36001253533\" data-uniquekey=\"1519129590429\"><\/p>\n<p><span>After setting the request type, you need to set the appropriate request URL and fill in the \u201cheader\u201d and \u201cbody\u201d fields.<\/span><br \/>\n<span>Here is an example of the body of an external request from<\/span><a href=\"https:\/\/api.manychat.com\/swagger#\/Sending\/post_fb_sending_sendContent\"><span>https:\/\/api.manychat.com\/swagger#\/Sending\/post_fb_sending_sendContent<\/span><\/a><span>Example of the external request body:<\/span><\/p>\n<p><span>{<\/span><br \/>\n<span>\u201csubscriber_id\u201d: 0,<\/span><br \/>\n<span>\u201cdata\u201d: {},<\/span><br \/>\n<span>\u201cmessage_tag\u201d: \u201cISSUE_RESOLUTION\u201d<\/span><br \/>\n<span>}<\/span><\/p>\n<p><span>The data {} here is filled with the following response format:<\/span><a href=\"https:\/\/manychat.github.io\/dynamic_block_docs\/\"><span>https<\/span><\/a><span>&nbsp;:&nbsp;<a href=\"https:\/\/manychat.github.io\/dynamic_block_docs\/\">\/\/manychat.github.io\/dynamic_block_docs\/<\/a>.<\/span><br \/>\n<span>More information about available headers can be found online. For example:<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\" rel=\"noreferrer noopener\">https<\/a>&nbsp;:&nbsp;<\/span><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers\" rel=\"noreferrer noopener\"><span>\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Headers<\/span><\/a><\/p>\n<p><span>Once completed, you can test your request by going to \u201c&nbsp;<\/span><strong><span>Response\u201d<\/span><\/strong><span>tab and clicking \u201c&nbsp;<strong>Test Request\u201d<\/strong>to test your<\/span><strong><span>request<\/span><\/strong><\/p>\n<p><span>If everything is completed correctly, you will receive an HTTP 200 code like this:<\/span><\/p>\n<p><img decoding=\"async\" class=\"fr-dib fr-fil\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001253928\/original\/oA_ZYLhO8nsvuotUYzbm1qskqLvMurzCFQ.png?1519130424\" data-filelink=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36001253928\/original\/oA_ZYLhO8nsvuotUYzbm1qskqLvMurzCFQ.png?1519130424\" data-fileid=\"36001253928\" data-uniquekey=\"1519129590429\"><\/p>\n<p><span>Let\u2019s create a default reply flow for Star Wars fans. There is a great free API method called<\/span><a href=\"https:\/\/swapi.co\/\" rel=\"noreferrer noopener\"><span>https:\/\/swapi.co\/<\/span><\/a><span>. We want to display the movie title and crawl the beginning by answering any word to the bot. If the title contains the word, then we will display the title and the crawled beginning.<\/span><\/p>\n<p><span>First, create two CUFs to store the title and the crawled beginning. Then go to the \u201cDefault Reply\u201d section, create an \u201cAction\u201d block, and select \u201cExternal Request\u201d.<\/span><\/p>\n<p><img decoding=\"async\" class=\"fr-dib fr-fil\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36020792007\/original\/schpG07J5NV1kBi72eKm0Dgi_ZnfSoOGzQ.png?1541495402\" data-filelink=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36020792007\/original\/schpG07J5NV1kBi72eKm0Dgi_ZnfSoOGzQ.png?1541495402\" data-fileid=\"36020792007\" data-uniquekey=\"1541495293607\"><\/p>\n<p><span>We will use the API search method<\/span><a href=\"https:\/\/swapi.co\/api\/films\/?search=hope\" rel=\"noreferrer noopener\"><span>https:\/\/swapi.co\/api\/films\/?search=hope<\/span><\/a><span>and send the last user input here. Next, we need to match the JSON response parameters with the CUFs.<\/span><\/p>\n<p><img decoding=\"async\" class=\"fr-dib fr-fil\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36020792061\/original\/H0JOUIatdYAhotqulvXoWHA58cxc1_YtxA.png?1541495451\" data-filelink=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36020792061\/original\/H0JOUIatdYAhotqulvXoWHA58cxc1_YtxA.png?1541495451\" data-fileid=\"36020792061\" data-uniquekey=\"1541495293607\"><\/p>\n<p><span>This is our result in Facebook Messenger.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"fr-dib fr-fil aligncenter\" src=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36020792151\/original\/EOyQULOpuUCRT-dCEhymWbCScfNhaq8_VQ.png?1541495503\" width=\"623\" height=\"412\" data-filelink=\"https:\/\/s3.amazonaws.com\/cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/36020792151\/original\/EOyQULOpuUCRT-dCEhymWbCScfNhaq8_VQ.png?1541495503\" data-fileid=\"36020792151\" data-uniquekey=\"1541495293607\"><\/p>\n<p><span>Hope this helps!<\/span><\/p>\n<p><em><span>PS: We also recommend that you read our<\/span><a href=\"https:\/\/support.manychat.com\/support\/solutions\/articles\/36000069400-devtools-quick-start\" target=\"_blank\" rel=\"noreferrer noopener\"><span>DevTools Quick Start<\/span><\/a><span>Articles to learn more about the topic.<\/span><\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>\u958b\u767c\u5de5\u5177\u5728\u81ea\u5b9a\u7fa9Bot\u6642\u63d0\u4f9b\u4e86\u66f4\u5927\u7684\u9748\u6d3b\u6027-\u8b93\u6211\u5011\u5728\u672c\u6587\u4e2d\u66f4\u8a73\u7d30\u5730\u4e86\u89e3\u201c\u5916\u90e8\u8acb\u6c42\u201d\u3002&nbsp; \u5916\u90e8\u8acb\u6c42\uff08P [&hellip;]<\/p>","protected":false},"author":20,"featured_media":0,"template":"","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"%%post_title%%","_seopress_titles_desc":"","_seopress_robots_index":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_eb_attr":"","_surecart_dashboard_logo_width":"180px","_surecart_dashboard_show_logo":true,"_surecart_dashboard_navigation_orders":true,"_surecart_dashboard_navigation_invoices":true,"_surecart_dashboard_navigation_subscriptions":true,"_surecart_dashboard_navigation_downloads":true,"_surecart_dashboard_navigation_billing":true,"_surecart_dashboard_navigation_account":true,"footnotes":""},"doc_category":[47],"doc_tag":[],"class_list":["post-930","docs","type-docs","status-publish","hentry","doc_category-manychat-advance"],"year_month":"2026-04","word_count":75,"total_views":"2457","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Michelle","author_nicename":"michelle","author_url":"https:\/\/manychat.com.hk\/en\/author\/michelle\/"},"doc_category_info":[{"term_name":"ManyChat Advance","term_url":"https:\/\/manychat.com.hk\/en\/docs-category\/manychat-advance\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs\/930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/users\/20"}],"version-history":[{"count":2,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs\/930\/revisions"}],"predecessor-version":[{"id":4354,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/docs\/930\/revisions\/4354"}],"wp:attachment":[{"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/media?parent=930"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/doc_category?post=930"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/manychat.com.hk\/en\/wp-json\/wp\/v2\/doc_tag?post=930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}