# WeChat 微信

按照本指南將您的微信公眾號連接到chatalog作為新的收件箱，以便您可以在一個地方管理所有的頻道並設置不同的自動化功能！

{% hint style="warning" %}
如果您沒有微信公眾號，請註冊微信服務號 [*點擊*](https://mp.weixin.qq.com/?lang=zh_CN\&token=)，您可以按照分步指南 [*點擊*](https://kf.qq.com/faq/120911VrYVrA151013MfYvYV.html)
{% endhint %}

## 微信公眾號連接到chatalog之前的準備工作

在開始將微信公眾號連接為新收件箱之前，您需要從微信公眾號獲取以下信息：&#x20;

* 原始ID &#x20;
* 開發者ID(AppID)
* 開發者密碼(AppSecret)

### 在哪裡可以找到您的原始ID、開發者ID(AppID)和開發者密碼(AppSecret)？

首先，您需要登錄您的 [WeChat ](https://mp.weixin.qq.com/)。

#### 原始ID&#x20;

單擊左側邊欄中“設置和開發”部分中的“公眾號設置”。向下滾動以在註冊信息部分找到原始 ID。複製原始ID以備用。

<figure><img src="/files/54AIwvqlXJwdiJvfRcl6" alt=""><figcaption></figcaption></figure>

**開發者ID(AppID)**

單擊左側邊欄“設置和開發”部分中的“基本配置”。您可以在公眾號開發信息下方找到開發者ID（AppID）和開發者密碼（AppSecret）。複製AppID以備用。&#x20;

**開發者密碼(AppSecret)**&#x20;

要生成AppSecret，您必須通過兩個驗證步驟。您必須掃描網頁上的二維碼。您需要重新輸入您的帳戶密碼。完成安全措施後，將會生成一個全新的App Secret。複製AppSecret以備用。

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

現在您開始連接微信收件箱&#x20;

轉到客樂AI的主頁，單擊“連接”，然後單擊微信收件箱圖標。

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

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

第1步：填寫收件箱名稱 (輸入一個簡單易懂的名字，以便幫助您輕鬆了解此收件箱的內容）&#x20;

第2步：填寫之前從微信儀表板複製的以下信息

* 原始ID &#x20;
* 開發者ID(AppID)
* 開發者密碼(AppSecret)

填寫“收件箱名稱”、“原始 ID”、“開發者ID(AppID)”和“開發者密碼(AppSecret) ”後，單擊“連接”。

#### Webhook URL 和Token&#x20;

在上一步中單擊“更新”後，您將看到客樂AI提供的Webhook URL和Token(令牌)。&#x20;

複製 Webhook Url 和 Token(令牌) 並將其粘貼回您的微信儀表板。

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

**如何將Webhook URL和Token粘貼到微信儀表板中**

在微信後台的基本配置頁面中，單擊“修改配置”按鈕以打開配置菜單。複製 chatalog 提供的 Webhook Url 和令牌並將它們粘貼到各自的字段中。

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

點擊“隨機生成” - 生成EncodingAESKey， 並選擇“明文模式”進行消息加密。&#x20;

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

**提交**您的更改。 進行任何配置更改後，請記住點&#x64CA;**「啟用」(Enable)**。

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

### 添加IP白名單

另外，您需要將chatalog的IP位址放入IP白名單中。

<figure><img src="/files/6yM5fDoNrnIYBCzAxloL" alt=""><figcaption></figcaption></figure>

將這些聊天記錄的IP位址加入您的白名單並確認修改。

> 35.229.153.39
>
> 34.96.220.218
>
> 34.96.222.188

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

如果您想了解更多關於微信為access\_token介面文件添加訪問白名單保護的信息，請點擊[***此處***](https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement\&key=1495617578\&version=1\&lang=zh_CN\&platform=2\&token=1390417593)。&#x20;

最後，您可以返回 chatalog 並發現您的微信收件匣已準備就緒。

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

恭喜！現在您已經完成了連接新微信收件匣的設置！


---

# 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://docs.chatalog.ai/zh-hk/platform-setup/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.
