Updated at: 2022-12-09 03:49:50
► Preparation
• Complete the enterprise WeChat service account application through WeChat official account management platform;
• Map the AnyRobot server IP deployed in the intranet to AnyRobot's public network IP through port 80.
► Binding Process
1. Add the AnyRobot server public network IP address to the IP whitelist of the service account: 
1) Use the applied service account to log in to the WeChat official account platform https://mp.weixin.qq.com/;
2) Click Development > Basic Settings, click View to display the IP Whitelist Setting window in the official account development information column, and add the public network IP address of AnyRobot server;
3) After adding, click Confirm Modification to display the scan-code verification window. You can contact the administrator or regular operator to use WeChat scan-code verification to complete IP whitelist configuration.
2. Configuring Server Parameters: 
1) In the server configuration column of Basic Settings, click Modify Configuration to fill in server configuration parameters;
2) Parameters are as follows: 
Field Name Description
URL Modified as AnyRobot public network IP or domain name
Ex: http://aishu.ncqsjg.cn/manager/user/wechat-listener
Token Custom Token, ex: anyrobot
Message encryption and decryption Plaintext mode must be selected
3) After completing the configuration, click Submit.
3. Get the AppID and AppSecret of WeChat service account: 
1) In Basic Settings, click View in the developer password (AppSecret) item in the official account development information column to display the window to reset AppSecret, complete authentication and password verification according to the step prompts, and click Next ;
2) The View Developer Password page records the generated AppID and AppSecret for subsequent modification of AnyRobot configuration parameters.
4. Enter Kubesphere management platform to modify AnyRobot configuration parameters: 
1) Log in to Kubesphere management platform, click Workspace and select aishu in the workspace list, as follows: 
2)    After entering the aishu workspace, click the anyrobot project to enter the project Overview page, as follows: 
3) In the left menu, click Configuration Center > ConfigMap, and click the ar-shared-configmap file, as follows: 
4) Enter the ar-shared-configmap file page, and click More Actions > Edit YAML, as follows: 

Add WeChat official account developer ID and password. The configuration parameters are as follows:

5. After modifying AnyRobot configuration parameters, please restart AnyRobot server to complete binding WeChat official account with AnyRobot.