# WeChat

WeChat (also known as Weixin) allows messages to be sent and received using its messaging API. This allows developers and third-party apps to automatically communicate through WeChat.

## Channel Integration

To begin, you will need:

* A WeChat Official account.
* A server associated with the above account. For more information, see [the official documentation page](https://developers.weixin.qq.com/doc/offiaccount/en/Basic_Information/Access_Overview.html) for setting up a server.

**STEP 1:** In iMBrace, create a new **WeChat channel** account, and identify the **webhook URL**.

<figure><img src="/files/W15EaVdvmc6RHpKCObgX" alt=""><figcaption></figcaption></figure>

**STEP 2:** Go to the [Weixin Official Accounts Platform](https://mp.weixin.qq.com/).

**STEP 3:** In the left side-bar, go to **\[设置与开发] (Settings and Development) > \[基本配置] (Basic Configuration)**.

<figure><img src="/files/VEKOTkxJHWEuhVf1yO4I" alt=""><figcaption></figcaption></figure>

**STEP 4:** Under **服务器配置 (Server Configurations)**, click **\[修改配置] (Edit Configuration)** and enter the webhook URL from iMBrace in the **URL** field. Then click **\[提交] (Submit)**.

**STEP 5:** Identify the **令牌 (Token)** and **消息加解密密钥 (EncodingAESKey)**, and enter them into the corresponding fields in iMBrace.

**STEP 6:** Under **公众号开发信息 (Official Account Development Information)**, identify the **开发者ID (AppID)** and **开发者密码 (AppSecret)**, and enter them into the corresponding fields in iMBrace.

**STEP 7:** In the top-right corner, go to your account's **帐号详情 (Account Info)**. Scroll down to the **注册信息 (Registration information)** section and identify your **原始ID (Original ID)**, and enter this into the **Original ID** field in iMBrace.

<figure><img src="/files/If6REDFzKdCimMwnwwOz" alt=""><figcaption></figcaption></figure>

**STEP 8:** In iMBrace, click **\[Create]**.

**DONE:** The channel account can then be used to send and receive messages through WeChat using the WeChat and WeChat Trigger nodes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://imbrace.gitbook.io/imbrace-documentation/channels/wechat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
