Deploy WeCom Bot
Deploy WeCom (Enterprise WeChat) bot to connect with LangBot.
INFO
This integration method is for internal enterprise applications, used within the enterprise. If you need external customer service, please check the WeCom Customer Service integration solution.
Create Bot
Enter the WeCom Admin Portal, log in to your account, after entering the main page, click App Management
, Build Your Own
, Create App
, fill in the basic information of the bot, after creation, you will see a page similar to this:
Set Callback Address
Get WeCom Configuration Items
- Open the WeCom Admin Portal homepage, click
My Enterprise
, and record the Enterprise ID at the bottom.
- Enable Contact Sync Permission
INFO
- This configuration item is for implementing LangBot's mass messaging feature, the specific code is located in libs/wecom_api/api.py.
- LangBot is still under development, so the functionality related to this configuration item has not been implemented yet.
- This configuration item can be filled with random characters, but cannot be empty.
Click Security and Management
, Management Tools
, Contact Sync
Click View Secret
, record it, this is the contacts_secret (Contact Sync Secret).
- Click
App Management
, find the bot you just created, view the bot's secret, and record it.
At this point, you have obtained three configuration items: corpid (Enterprise ID), secret (Bot Secret), and contacts_secret (Contact Sync Secret).
Configure Callback Address
Enter the bot page.
Click Enterprise Trusted IP
at the bottom and add the server where LangBot is deployed.
Click Receive Messages
, Set API Reception
, and start filling in the server message reception configuration.
Fill in the URL as http://your_ip_address:2290/callback/command
, where your IP address is the address of the server where LangBot is deployed.
Click to randomly generate the Token and EncodingAESKey, and record them
Connect to LangBot
Save Callback Address
When the five configuration items above have been correctly obtained and accurately filled into the WeCom adapter, then start LangBot.
Return to the callback address configuration page and click save. If the above configuration items are filled in correctly, the save will be successful, which means that WeCom and LangBot can communicate (deployment successful). If you see openapi request callback address failed, please triple-check that your configuration items are filled in correctly.