> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# WeChat

> Connect and use Expert in WeChat

Connect your AI Expert to WeChat, allowing users to chat with your Expert through a WeChat Official Account or Service Account. The WeChat channel targets consumer-facing users and is ideal for scenarios where you need to reach end users through WeChat.

## Use Cases

The WeChat channel is particularly suited for:

* **Customer Support**: Users receive AI-powered support through your Official Account
* **Knowledge Consultation**: Followers can ask questions anytime and get professional answers
* **Service Notifications**: Combine with Official Account template messages for proactive outreach

<Note>
  The WeChat channel primarily targets consumer-facing users reached through Official Accounts. For internal enterprise collaboration, we recommend the WeCom channel instead.
</Note>

## Integration Method

The WeChat channel is integrated through a WeChat Official Account (Service Account):

<Steps>
  <Step title="Prepare Your Official Account">
    You need a verified WeChat Service Account (Subscription Accounts have limited API access). Log in to the [WeChat Official Account Platform](https://mp.weixin.qq.com).
  </Step>

  <Step title="Enable Developer Mode">
    Go to "Settings & Development" → "Basic Configuration" and enable Developer Mode. Take note of the AppID and AppSecret.
  </Step>

  <Step title="Configure Server Settings">
    Under "Server Configuration":

    * URL: Enter the message callback URL provided by Profy
    * Token: Define a custom verification token
    * EncodingAESKey: Generate randomly
    * Message Encryption: Select secure mode
  </Step>

  <Step title="Enter in Profy">
    Enter the AppID, AppSecret, Token, and EncodingAESKey in the Expert Studio channel configuration.
  </Step>

  <Step title="Enable and Test">
    After saving the configuration, follow your Official Account on WeChat and send a test message.
  </Step>
</Steps>

## Message Format

The WeChat channel replies with text messages:

* Expert replies are sent as plain text or rich media messages
* Basic text formatting is supported
* Tool call processes are transparent to users — they only see the final result
* Long replies may be split into multiple messages

<Tip>
  WeChat has a 5-second response timeout. If AI processing takes longer than 5 seconds, the system uses the Customer Service Message API to reply asynchronously — users will receive a push notification once processing is complete.
</Tip>

## Feature Scope

### Fully Supported

| Capability              | Description                                    |
| ----------------------- | ---------------------------------------------- |
| Multi-turn conversation | Context memory and continuous dialogue         |
| Tool calls              | Search, knowledge base, and other basic tools  |
| Skills                  | Installed Skills work as expected              |
| Unified billing         | Consumes credits from the user's Profy account |

### Web-Only (Not Available via IM)

The following features are only available on the Profy web interface:

* Sandbox code execution and preview
* File tree browsing
* Website generation and preview panels
* Multi-panel workspace layout
* File upload and real-time collaborative editing

<Warning>
  WeChat channel users must first register a Profy account on the web and link their WeChat to use Expert and enable billing. Unlinked users will receive a prompt to register.
</Warning>

## User Identity Association

The WeChat channel requires linking WeChat users to Profy accounts:

<AccordionGroup>
  <Accordion title="Automatic Linking">
    If a user's Profy account is already linked to their WeChat, the system automatically recognizes and associates them. Conversation credits are deducted from the user's Profy account.
  </Accordion>

  <Accordion title="Registration Prompt">
    When an unlinked WeChat user sends a message, they receive a prompt with registration/linking instructions, including a registration link and step-by-step guide.
  </Accordion>
</AccordionGroup>

## Important Notes

<Warning>
  * WeChat Official Account APIs require a verified Service Account
  * Subscription Accounts can be integrated but have limited proactive messaging capabilities
  * WeChat imposes message frequency limits — monitor API quotas in high-concurrency scenarios
  * Enabling Developer Mode disables native Official Account features like auto-replies
</Warning>

## FAQ

<AccordionGroup>
  <Accordion title="Official Account not replying to messages">
    * Verify Developer Mode is enabled
    * Verify the server configuration has passed validation
    * Verify the credentials in Profy channel configuration are correct
    * Check if the async reply mode was triggered due to timeout
  </Accordion>

  <Accordion title="High reply latency">
    If WeChat message processing exceeds 5 seconds, replies are sent through the async path. Users may experience a wait of several seconds up to about ten seconds. This is related to AI model inference time and tool calls, and is expected behavior.
  </Accordion>

  <Accordion title="Users receive 'Please register first' prompt">
    The user's WeChat is not yet linked to a Profy account. Guide them to register on the Profy web interface and link their WeChat in account settings.
  </Accordion>
</AccordionGroup>

## Related Pages

<CardGroup cols={2}>
  <Card title="Channels Overview" icon="layer-group" href="/en/documentation/channels/overview">
    Learn about all supported IM platforms
  </Card>

  <Card title="WeCom Integration" icon="message" href="/en/documentation/channels/wecom">
    WeCom channel setup guide
  </Card>
</CardGroup>
