This node.js example connector allows you to make your Teneo bot available on WeChat. The connector acts as middleware that establishes a conversation between WeChat and Teneo. This guide will take you through the steps of setting up this WeChat connector.
You can find the source code for this connector on Github.
WeChat's website is in mandarin. The instructions below should be able to get you going even if you don't understand Mandarin. If desired however, you may wish to use an extension to translate their website.
Making the connector available via https is preferred. We recommend using ngrok for this.
WeChat app should already be running on your device. If not, download it from an App Store and Sign up for a new account.
Your bot needs to be published and you need to know the engine URL.
git clone https://github.com/artificialsolutions/tie-api-example-wechat.git
npm install
Token
field and copy or remember it, you will need it later.appID
that is shown in the first row of the first table at the top of the page..env
in the root folder of the project. Give it the following content:
APP_ID=<your app id here>
TOKEN=<your token here>
TENEO_ENGINE_URL=<your teneo engine url here>
Replace the placeholders with the values you copied earlier.
node server.js
Use ngrok the connector available via https:
ngrok http 3000
URL
value for the following steps.URL
from the previous step into the URL of Webchat's dashboard online. Also, add a /wechat
suffix to the URL field, so that it looks something like this:
http://1234abcd.ngrok.io/wechat
Was this page helpful?