> ## 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.

# Feishu

> Connect and use Expert in Feishu

Connect your AI Expert to Feishu (Lark), allowing team members to chat with your Expert directly in their everyday Feishu messages. The Feishu channel supports full conversation capabilities and additionally offers user-level OAuth authorization, enabling your Expert to access users' personal documents and spreadsheets.

## Integration Methods

Feishu offers two integration methods:

<AccordionGroup>
  <Accordion title="QR Code Quick Setup (Recommended)">
    The fastest way to get started — takes just a few minutes:

    1. Go to "Channel Integration" in Expert Studio and select Feishu
    2. Click "Scan to Connect"
    3. Scan the QR code with a Feishu admin account
    4. Confirm authorization — all configuration is completed automatically
    5. Find the bot in Feishu and start testing

    The QR code method automatically creates a Feishu app and configures all required permissions and callback URLs.
  </Accordion>

  <Accordion title="Manual Configuration">
    Choose manual configuration when you need more granular permission control:

    1. Log in to the [Feishu Open Platform](https://open.feishu.cn) and create an enterprise custom app
    2. Enable the bot under the "Bot" capability
    3. Configure the event subscription callback URL (available in the Profy integration panel)
    4. Add required permissions (message sending/receiving, contacts read access, etc.)
    5. Enter the App ID and App Secret in the Profy integration panel
    6. Publish the app version and pass the review

    Manual configuration is suited for scenarios where you need to limit specific permission scopes, or want to reuse an existing Feishu app.
  </Accordion>
</AccordionGroup>

## Message Format

The Feishu channel uses a "multi-bubble" message style:

* Expert text replies are sent as individual message bubbles
* Status notifications are sent during tool calls (e.g., "🔍 Searching...")
* The final reply is sent after tool completion
* Markdown formatting is supported

<Note>
  Feishu messages have a length limit. Overly long replies are automatically split into multiple messages.
</Note>

## Chat Scenarios

### One-on-One Chat

Send a message directly to the bot to start a private conversation. Ideal for personal use cases.

### Group Chat

@mention the bot in a group to send a message — the Expert will reply within the group. Suitable for team collaboration where other members can follow the conversation.

<Tip>
  In group chat, the Expert only responds to messages that @mention it. It won't reply to every message in the group.
</Tip>

## User OAuth Authorization

A unique feature of the Feishu channel — after completing user-level OAuth authorization via the `/auth` command, your Expert can access your personal Feishu resources.

### Authorization Flow

<Steps>
  <Step title="Send the Auth Command">
    Send `/auth` in your Feishu conversation with the Expert.
  </Step>

  <Step title="Click the Authorization Link">
    The Expert will reply with a message containing an authorization link. Click it.
  </Step>

  <Step title="Confirm Authorization">
    On the Feishu OAuth page, review the authorization scopes (document read access, spreadsheet access, etc.) and click approve.
  </Step>

  <Step title="Authorization Activated">
    Once authorized, the Expert can access Feishu documents and spreadsheets on your behalf.
  </Step>
</Steps>

### Capabilities After Authorization

After completing OAuth, the Expert gains the following additional capabilities:

| Capability                 | Description                                                   |
| -------------------------- | ------------------------------------------------------------- |
| **Document Read**          | Read Feishu documents you have access to                      |
| **Spreadsheet Operations** | Query and modify your spreadsheet data                        |
| **Knowledge Base Search**  | Search for information in knowledge spaces you have access to |

<Warning>
  OAuth tokens have an expiration period. When expired, the Expert will prompt you to run the `/auth` command again. If token refresh fails, the Expert automatically falls back to basic capabilities (without accessing your personal resources), and normal conversation continues unaffected.
</Warning>

## FAQ

<AccordionGroup>
  <Accordion title="Bot not responding to messages">
    Check the following:

    * Verify the app has been published and approved
    * Verify the event callback URL is correctly configured
    * Verify the Expert's Profy service is running normally
    * In group chat, make sure you @mentioned the bot
  </Accordion>

  <Accordion title="Slow responses">
    IM channel response speed depends on AI model inference time and tool call duration. Response time increases when tools like search or file processing are used. This is consistent with the web experience.
  </Accordion>

  <Accordion title="/auth command not working">
    Verify that the Expert you're using has Feishu OAuth capability configured by its creator. Not all Experts support this feature.
  </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="DingTalk Integration" icon="message" href="/en/documentation/channels/dingtalk">
    DingTalk channel setup guide
  </Card>
</CardGroup>
