{"id":23860,"date":"2020-07-03T17:22:16","date_gmt":"2020-07-03T16:22:16","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=23860"},"modified":"2022-09-30T18:19:52","modified_gmt":"2022-09-30T17:19:52","slug":"adding-the-wechat-channel","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/channel-enablement\/adding-the-wechat-channel\/","title":{"rendered":"Adding the WeChat Channel"},"content":{"rendered":"<p><span style=\"font-weight: 400\">To set up WeChat as a channel, you need to register for a WeChat Official Account. You also need to enable webhook integrations for the XO Platform to send and receive messages.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Please refer to the WeChat Official Accounts <\/span><a href=\"https:\/\/admin.wechat.com\/cgi-bin\/readtemplate?t=ibg_en\/en_faq_tmpl&amp;type=info&amp;lang=en_US\"><span style=\"font-weight: 400\">Registration Process<\/span><\/a><span style=\"font-weight: 400\"> for more information.<\/span><\/p>\n<p><span style=\"font-weight: 400\">For development purposes, you may also use the WeChat Sandbox environment to integrate the assistant and test functionality. This article takes you through the setup process.<\/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<h1><span class=\"ez-toc-section\" id=\"Step_1_Set_up_a_WeChat_Sandbox_Account\"><span style=\"font-weight: 400\">Step 1: Set up a WeChat Sandbox Account<\/span><\/span><\/h1>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Register and login to the WeChat Sandbox environment from <\/span><a href=\"https:\/\/mp.weixin.qq.com\/?lang=en_US&amp;token=\"><span style=\"font-weight: 400\">here for English<\/span><\/a><span style=\"font-weight: 400\"> and <\/span><a href=\"https:\/\/mp.weixin.qq.com\/?lang=zh_CN&amp;token=\"><span style=\"font-weight: 400\">here for Chinese<\/span><\/a><span style=\"font-weight: 400\"> versions.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>Login<\/strong><span style=\"font-weight: 400\"> button to continue.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You would be required to install the WeChat mobile app to allow sign in using the QR presented on-screen.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Scan the <\/span><strong>QR code<\/strong><span style=\"font-weight: 400\"> and confirm Login to proceed.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Post successful sign-in, you would be redirected to the Sandbox portal.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The Sandbox portal provides information about your WeChat Sandbox App ID and App Secret.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Make note of <\/span><strong>App ID<\/strong><span style=\"font-weight: 400\"> and <\/span><strong>App Secret<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You need to enter the WebHook <\/span><strong>URL<\/strong><span style=\"font-weight: 400\"> and <\/span><strong>Token<\/strong><span style=\"font-weight: 400\">, you can obtain these values from the Channel page of the XO Platform as explained below.<\/span><\/li>\n<\/ol>\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<h1><span class=\"ez-toc-section\" id=\"Step_2_Set_up_a_Webhook\"><span style=\"font-weight: 400\">Step 2: Set up a Webhook<\/span><\/span><\/h1>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the XO Platform, select the assistant that you want to add the WeChat channel to.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><strong>Deploy &gt; Channels<\/strong><span style=\"font-weight: 400\">, and select <\/span><strong>WeChat<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Navigate to the <\/span><strong>Configurations<\/strong><span style=\"font-weight: 400\"> tab and enter the following details:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>App Id<\/strong><span style=\"font-weight: 400\"> \u2013 <\/span><em><span style=\"font-weight: 400\">App Id <\/span><\/em><span style=\"font-weight: 400\">from the weChat Sandbox portal page<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>App Password<\/strong><span style=\"font-weight: 400\"> \u2013 <\/span><em><span style=\"font-weight: 400\">App Secret<\/span><\/em><span style=\"font-weight: 400\"> from the weChat Sandbox portal page<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Make a note the following details<\/span>\n<ol>\n<li style=\"font-weight: 400\"><em><span style=\"font-weight: 400\">Webhook URL<\/span><\/em><span style=\"font-weight: 400\">, and<\/span><\/li>\n<li style=\"font-weight: 400\"><em><span>Access Token<\/span><\/em><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Update the <\/span><strong>WeChat Sandbox portal page<\/strong><span style=\"font-weight: 400\"> with the above URL and access token and <\/span><strong>Save<\/strong><span style=\"font-weight: 400\"> the details<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Enable<\/strong><span style=\"font-weight: 400\"> the weChat channel from the XO Platform.<\/span><\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930181624\/config-channel-7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-46964\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930181624\/config-channel-7.png\" alt=\"\" width=\"602\" height=\"607\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930181624\/config-channel-7.png 840w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930181624\/config-channel-7-150x150.png 150w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930181624\/config-channel-7-298x300.png 298w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930181624\/config-channel-7-100x100.png 100w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">After the channel is enabled and all configurations are verified, you can optionally publish the assistant to make it available for end-users, with the new channel. Learn more about<\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/publish\/publishing-bot\/\"><span style=\"font-weight: 400\"> Publishing your Virtual Assistant<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">To learn more about working with Channels within the Kore.ai XO Platform, please see<\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/channel-enablement\/adding-channels-to-your-bot\/\"><span style=\"font-weight: 400\"> Channel Enablement.<\/span><\/a><\/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>To set up WeChat as a channel, you need to register for a WeChat Official Account. You also need to enable webhook integrations for the XO Platform to send and receive messages. Please refer to the WeChat Official Accounts Registration Process for more information. For development purposes, you may also use the WeChat Sandbox environment&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-23860","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\/23860","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=23860"}],"version-history":[{"count":7,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/23860\/revisions"}],"predecessor-version":[{"id":46969,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/23860\/revisions\/46969"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=23860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=23860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=23860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}