FastGPTFastGPT

WeChat Official Account Integration

Integrate a FastGPT application with a WeChat Official Account for automated follower message replies.

Starting from version 4.8.10, FastGPT commercial edition supports direct WeChat Official Account integration without additional APIs.

Note: Currently only verified official accounts are supported (both Service Accounts and Subscription Accounts).

FastGPT official account channel configuration with empty credentials

The screenshot shows the FastGPT configuration form. Enter credentials from your own platform application. Follow the official platform console linked below for its current console layout.

1. Create a Publishing Channel in FastGPT

In FastGPT, select the app you want to integrate. On the Publishing Channels → WeChat Official Account page, click New in the upper-right corner and fill in the basic information.

2. Get AppID, Secret, and Token

1. Log in to the WeChat Official Account Platform and select your account.

Open the WeChat Official Account website: https://mp.weixin.qq.com

Only verified official accounts are supported. Unverified accounts are not currently supported.

Developers can use the official API test-account portal to test integration. Available capabilities differ from production accounts; configure encryption using the fields provided by the platform.

2. Enter App ID, Secret, and Token (AES Key Optional)

In the FastGPT configuration dialog, App ID, Secret, and Token are required, and AES Key is optional. You define or randomly generate the Token and AES Key in the server configuration of the Official Account Platform; enter the same values on both FastGPT and the platform.

3. Add FastGPT IP to IP Whitelist

Self-hosted users can check their own IP address.

International edition users (cloud.fastgpt.io) can add the following IP whitelist:

35.240.227.100
34.124.237.188
34.143.240.160
34.87.51.146
34.87.79.202
35.247.163.68
34.87.102.86
35.198.192.104
34.126.163.205
34.124.189.116
34.143.149.171
34.87.173.252
34.142.157.52
34.87.180.104
34.87.20.189
34.87.110.152
34.87.44.74
34.87.152.33
35.197.149.75
35.247.161.35

China Mainland users (fastgpt.cn) can add the following IP whitelist:

47.97.1.240
121.43.105.217
121.41.178.7
121.40.65.187
47.97.59.172
101.37.205.32
120.55.195.90
120.26.229.115
120.55.193.112
47.98.190.173
112.124.41.79
121.196.235.183
121.41.75.88
121.43.108.48
112.124.12.6
121.43.52.222
121.199.162.43
121.199.162.102
120.55.94.163
47.99.59.223
112.124.46.5
121.40.46.247
120.26.145.73
120.26.147.199
121.43.125.163
121.196.228.45
121.43.126.202
120.26.144.37

4. Get AES Key and Select Encryption Mode

  1. Randomly generate an AES Key and enter it into the FastGPT configuration dialog.

  2. Select the encryption mode as Secure Mode.

5. Get URL

  1. Confirm creation in FastGPT. The dialog closes; click Request URL on the channel's row in the list and copy the URL.

  2. Enter it in the URL field on the WeChat Official Account Platform, then submit and save.

6. Enable Server Configuration (Skip if already auto-enabled)

In the WeChat Official Accounts console, enable the saved server configuration and confirm its enabled status. If validation fails, check the callback URL, Token, encryption settings, and reachability before retrying.

7. Start Using

Now when users send messages to the official account, messages will be forwarded to FastGPT, and conversation results will be returned through the official account. Send Reset (case-sensitive) to start a fresh chat history; for channel troubleshooting, see App, Chat, and Plugin FAQ.

Edit on GitHub

Last updated