{"id":23860,"date":"2020-07-03T17:22:16","date_gmt":"2020-07-03T16:22:16","guid":{"rendered":"https:\/\/developer.kore.ai\/?p=23860"},"modified":"2021-10-21T13:08:51","modified_gmt":"2021-10-21T12:08:51","slug":"adding-the-wechat-channel","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/v9-0\/docs\/bots\/channel-enablement\/adding-the-wechat-channel\/","title":{"rendered":"Adding the WeChat Channel"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p>To set up WeChat as a channel, you need to register for a WeChat Official Account. You also need to enable webhook integration for the Bots platform to send and receive messages.<\/p>\n<p>Please refer WeChat Official Accounts <a href=\"https:\/\/admin.wechat.com\/cgi-bin\/readtemplate?t=ibg_en\/en_faq_tmpl&amp;type=info&amp;lang=en_US\" target=\"_blank\" rel=\"noopener noreferrer\">Registration Process<\/a> for more information.<\/p>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p><strong>To add the weChat Messaging channel to a bot<\/strong><\/p>\n<p>For development purposes, you may also use the WeChat Sandbox environment to integrate the bot and test the bot functionality. This next section elaborates on setting up and using the sandbox account.<\/p>\n<p><strong>Step 1: Setup Sandbox Account<\/strong><\/p>\n<ul>\n<li>Register and login to WeChat Sandbox environment from <a href=\"http:\/\/admin.wechat.com\/debug\/cgi-bin\/sandbox?t=sandbox\/login\" target=\"_blank\" rel=\"noopener noreferrer\">here for English<\/a> and <a href=\"https:\/\/mp.weixin.qq.com\/debug\/cgi-bin\/sandbox?t=sandbox\/login\" target=\"_blank\" rel=\"noopener noreferrer\">here for Chinese<\/a> versions.<\/li>\n<li>Click \u2018<strong>Log In<\/strong>\u2019 button to continue to login.<\/li>\n<li>You would be required to install the WeChat mobile app to allow sign in using the QR presented on-screen.<\/li>\n<li>Scan the <strong>QR code<\/strong> and confirm Login to proceed.<\/li>\n<li>Post successful sign-in, you would be redirected to the Sandbox portal.<\/li>\n<li>The Sandbox portal provides information about your WeChat Sandbox App ID and App Secret.<\/li>\n<li>Make note of <strong>App ID<\/strong> and <strong>App Secret<\/strong>.<\/li>\n<li>You need to enter the WebHook <strong>URL<\/strong> and <strong>Token<\/strong>, you can obtain these values from the Channel Enablement page of the Bots Platform as explained below.<\/li>\n<\/ul>\n<\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p><strong>Step 2: Setup Webhook<\/strong><\/p>\n<p>From the Bots platform:<\/p>\n<ul>\n<li>In the\u00a0<b>Bots<\/b> section of the Bot Builder, click the Bot that you want to add the weChat channel to.<\/li>\n<li>On the\u00a0<b>Channels<\/b>\u00a0tab, click the\u00a0<strong>weChat<\/strong><b>\u00a0<\/b>icon. The <strong>weChat<\/strong> <b>Channel<\/b>\u00a0page gets displayed.<\/li>\n<li>Navigate to the\u00a0<b>Configurations<\/b> tab and enter the following details:\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><strong>App Id<\/strong> &#8211; <em>App Id <\/em>from the weChat Sandbox portal page<\/li>\n<li><strong>App Password<\/strong> &#8211;\u00a0<em>App Secret<\/em> from the weChat Sandbox portal page<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/weChat-config2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22974\" src=\"\/wp-content\/uploads\/sites\/22\/weChat-config2.png\" alt=\"\" width=\"699\" height=\"547\" \/><\/a><\/li>\n<li>Make a note the following details\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><em>Webhook URL<\/em>, and<\/li>\n<li><em>Access Token<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/22\/weChat-config1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22975\" src=\"\/wp-content\/uploads\/sites\/22\/weChat-config1.png\" alt=\"\" width=\"699\" height=\"547\" \/><\/a><\/li>\n<li>Update the <strong>WeChat Sandbox portal page<\/strong> with the above URL and access token and <strong>Save<\/strong> the details<\/li>\n<li><strong>Enable<\/strong> the weChat channel from the Bots platform.<\/li>\n<\/ul>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h1><span class=\"ez-toc-section\" id=\"Editing_the_Channel\"><\/span>Editing the Channel<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>To edit the channel, hover your mouse over the channel and click to modify. You can make necessary updates to your channel configurations and save them. You may also disable or delete the channel information by clicking the <b>Settings icon.<br \/>\n<\/b>Select one of the following commands to modify the channel:<\/p>\n<ul>\n<li><b>Disable\/Enable<\/b> \u2013 Click <b>Disable<\/b> to temporarily disable use of the Slack channel for your Bot. To enable the use of the Slack, click <b>Enable<\/b>.<\/li>\n<li><b>Delete<\/b> \u2013 Click <b>Delete<\/b>, and then click <b>OK<\/b> in the <b>Delete Confirmation<\/b> dialog to permanently delete the Bot channel configuration.<\/li>\n<\/ul>\n<div class=\"alert alert-warning\"><b>Warning:<\/b> This operation is permanent, and cannot be undone.<\/div>\n<\/div><\/div><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><\/section>\n","protected":false},"excerpt":{"rendered":"To set up WeChat as a channel, you need to register for a WeChat Official Account. You also need to enable webhook integration for the Bots platform to send and receive messages. Please refer WeChat Official Accounts Registration Process for more information. To add the weChat Messaging channel to a bot For development purposes, you...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/23860"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/comments?post=23860"}],"version-history":[{"count":2,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/23860\/revisions"}],"predecessor-version":[{"id":30940,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/23860\/revisions\/30940"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/media?parent=23860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/categories?post=23860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/tags?post=23860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}