WeCom (Enterprise WeChat) Bots Explained (Simple Guide)

Learn the two bot options in WeCom (group webhooks vs. official accounts), APIs, and usage scenarios.

Dec 10, 2021 · 1 min read · 212 Words · -Views -Comments · Digital Life
🇨🇳 阅读中文版
Read with AI

Choose an AI assistant

ChatGPT Open in a new tab with the article link and prompt
Claude Copy the prompt, then open Claude

Open Claude
Trouble reading the article?

If the prompt is missing, copy the full prompt below into your AI assistant. If the AI cannot read the article, paste the visible passage you want to discuss and add your question.

In work, WeCom (Enterprise WeChat) is our collaboration tool, and CI mechanisms are well-established in our company. For notification purposes, we often use it for instant feedback.

Recently I’ve been involved in integrating some projects and learned about the WeCom API, so here’s an explanation of bots.

Strictly speaking, we can create two types of bots:

  1. Group Bots
  2. Regular Account Bots

Group Bots

  1. Requires an administrator to create in the group, obtaining a webhook address
  2. Usage: Send request messages normally according to API requirements
  3. During testing, you can use curl commands or Postman for experimentation.

Regular Account Bots

Sometimes we want bots to send direct messages or perform more complex interactive operations. This can be achieved by calling APIs with a regular WeCom account.

  1. Register a WeCom account
  2. Call the API to obtain an access_token, then use it to send messages, create groups, etc.

Final Thoughts

  1. Different approaches have different capabilities. For example, currently group bots can’t send messages with interactive buttons. Choose the solution that fits your needs.
  2. Personally, I think WeCom’s API is not as good as Telegram’s, but in the domestic Chinese environment, its ecosystem advantage is huge, so… we have to use it.
  3. I hope WeChat will also open up its API… not sure if that will happen.
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover