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

# Connect to Feishu Bot

## One-Click Setup (Recommended)

LangBot supports one-click Feishu app creation with automatic credential filling — no manual copy-paste needed.

1. Open LangBot WebUI, go to **Bots > Create Bot**
2. Enter a bot name, select `Feishu` as the platform/adapter
3. In the **One-Click Create App** section that appears, click the **Start** button

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/lark/lark_oneclick_qrcode.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=5af9f37cd15c93853c13c23ab09196af" alt="One-Click Create Feishu App" width="1868" height="891" data-path="images/zh/deploy/bots/lark/lark_oneclick_qrcode.png" />

4. Scan the QR code with Feishu. On your phone, you'll see the Feishu Open Platform's bot creation page
5. Choose to **use an existing app** or **create a new one**:

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/lark/lark_select_or_create_bot.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=3c23aab467c3849f42b3d092501f08d9" alt="Select on Phone" width="1473" height="889" data-path="images/zh/deploy/bots/lark/lark_select_or_create_bot.png" />

If you choose an existing app, a list of your apps will be shown:

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/lark/lark_select_existing.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=992a3b8307ab26b140c1a3f5dba16466" alt="Select Existing App" width="380" height="844" data-path="images/zh/deploy/bots/lark/lark_select_existing.png" />

6. After authorization, the phone will show "Configuration Successful", and app\_id / app\_secret will be **auto-filled** in the LangBot WebUI

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/lark/lark_config_success.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=4d4fee86bf7b13bdbdf4fad035c9b380" alt="Config Success" width="1576" height="920" data-path="images/zh/deploy/bots/lark/lark_config_success.png" />

7. **Manually fill in the bot name** — it must match the Feishu bot name, otherwise the bot won't receive messages in groups

<img src="https://mintcdn.com/langbot/2gQAELt1nN3_kQMs/images/zh/deploy/bots/lark/lark_fill_bot_name.png?fit=max&auto=format&n=2gQAELt1nN3_kQMs&q=85&s=556bde429c568f672409c3c1294b8e69" alt="Fill Bot Name" width="1676" height="893" data-path="images/zh/deploy/bots/lark/lark_fill_bot_name.png" />

8. Click **Submit** to complete

***

## Create Bot

Go to the [Feishu Open Platform](https://open.feishu.cn/app), log in, and create an enterprise self-built application or store application. [(difference introduction)](https://open.feishu.cn/document/platform-overveiw/overview)

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/lark/lark_01.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=698d381ebc66e58f683c9d2321a96c65" alt="alt text" width="2488" height="1390" data-path="images/zh/deploy/bots/lark/lark_01.png" />

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_02.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=5d0c70300e7df42c1e9cd85f56c52bff" alt="alt text" width="1448" height="1228" data-path="images/zh/deploy/bots/lark/lark_02.png" />

Add bot capability to the application:

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_03.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=79797d777aa43776136010f2705de685" alt="alt text" width="2264" height="1440" data-path="images/zh/deploy/bots/lark/lark_03.png" />

Add the permissions shown in the image in the permission management:

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_04.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=a4dffa4bc7be475e2aea37df65e05b31" alt="alt text" width="3170" height="1440" data-path="images/zh/deploy/bots/lark/lark_04.png" />

If card streaming permissions are required, additionally add the following card creation and update permissions as shown in the image:

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_14.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=a389c94716cede521e74577c43cbf37e" alt="img_1.png" width="3178" height="1628" data-path="images/zh/deploy/bots/lark/lark_14.png" />

<Warning>
  If you need to change the default card template, you need to modify the card template in the platform adapter's code yourself.
</Warning>

### Connect to LangBot

Find `app_id` and `app_secret` on the `Credentials and Basic Information` page.

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_05.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=7cf0313f74c9e2386cf4d7e8adcd18d4" alt="alt text" width="2150" height="886" data-path="images/zh/deploy/bots/lark/lark_05.png" />

Open LangBot's Webui configuration page, create a new bot

Fill in the relevant information in the form

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/lark/connect_to_langbot.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=447c067002f8dfd754494a2530e54b98" alt="alt text" width="1014" height="1892" data-path="images/zh/deploy/bots/lark/connect_to_langbot.png" />

Streaming related:

<img src="https://mintcdn.com/langbot/BZuGA47SaPPwv_j7/images/zh/deploy/bots/lark/connect_to_langbot01.png?fit=max&auto=format&n=BZuGA47SaPPwv_j7&q=85&s=69e042a2e38bc395f18c777261a17f43" alt="Streaming related" width="1920" height="893" data-path="images/zh/deploy/bots/lark/connect_to_langbot01.png" />

After filling in, start LangBot. If configured successfully, the log will show `[01-29 23:42:56.796] manager.py (68) - [INFO] : Initializing platform adapter 1: lark`, keep LangBot running.

<Warning title="">
  By default, WebSocket long connection mode is used, corresponding to the long connection subscription below. But in some cases (such as international version of Feishu), long connection mode is not available, in which case you need to use Webhook mode, corresponding to the `Send events to developer server` mode, please refer to the following configuration:

  * `enable-webhook`: Set to `true`
  * `encrypt-key`: Set to `Encrypt Key` in the `Encryption Strategy` of the `Events and Callbacks` page

  Note that in Webhook mode, LangBot needs to be deployed on a server with a public IP, and ensure that the firewall has opened the port configured above.
</Warning>

<Tip>
  **No public server?** [LangBot Cloud](https://space.langbot.app/cloud) includes built-in domain and HTTPS — get Lark bots working out of the box.
</Tip>

### Configure Event Subscription

Go to the `Events and Callbacks` page, configure the subscription method as `Long Connection`:

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_07.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=0cd12a2b1a03c95292fa57dc8dfde5f0" alt="alt text" width="2476" height="962" data-path="images/zh/deploy/bots/lark/lark_07.png" />

And add the event: `Receive Messages`

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_08.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=42a23159655e5ddf72aa9856c2aab4db" alt="alt text" width="2064" height="570" data-path="images/zh/deploy/bots/lark/lark_08.png" />

Set up `Callback Configuration`, select the long connection callback (use webhook if using webhook mode)

<img src="https://mintcdn.com/langbot/wl0V3l3GoV7sRjdf/images/zh/deploy/bots/lark/lark_16.png?fit=max&auto=format&n=wl0V3l3GoV7sRjdf&q=85&s=6d1d2e746c06211970baaa53eb2259f6" alt="Set up callback configuration" width="1848" height="722" data-path="images/zh/deploy/bots/lark/lark_16.png" />

Add the callback `Card Callback Interaction`

<img src="https://mintcdn.com/langbot/wl0V3l3GoV7sRjdf/images/zh/deploy/bots/lark/lark_17.png?fit=max&auto=format&n=wl0V3l3GoV7sRjdf&q=85&s=134ccb323842343c08eb451775d35bca" alt="Add callback" width="1920" height="935" data-path="images/zh/deploy/bots/lark/lark_17.png" />

<Warning title="">
  Webhook mode configuration method:

  <img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_13.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=52358ef5436b7575f2c52f2873897cf1" alt="alt text" width="1528" height="546" data-path="images/zh/deploy/bots/lark/lark_13.png" />

  Please start LangBot first, fill in the Webhook address obtained from LangBot here.
</Warning>

### Publish Bot

Click `Create Version` at the top, fill in the version number and other information, click `Save` below.

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_09.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=39b25c0bd52713f63339e6a4ee07207b" alt="alt text" width="1808" height="1702" data-path="images/zh/deploy/bots/lark/lark_09.png" />

Add the bot to a Feishu group to use it:

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_10.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=59814214fe07dbc0fc6eead741058ad6" alt="alt text" width="2328" height="1598" data-path="images/zh/deploy/bots/lark/lark_10.png" />

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_11.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=2d58666b978511253f2524442cda30a0" alt="alt text" width="754" height="520" data-path="images/zh/deploy/bots/lark/lark_11.png" />

Private chat can also be used directly

<img src="https://mintcdn.com/langbot/7LP8IdEMby3DrX2X/images/zh/deploy/bots/lark/lark_12.png?fit=max&auto=format&n=7LP8IdEMby3DrX2X&q=85&s=75484117825bbdb098cc07745bdf807c" alt="alt text" width="1104" height="704" data-path="images/zh/deploy/bots/lark/lark_12.png" />

## Common Issues

* Store app bots cannot respond to chat messages immediately after creation/saving. Due to the [app\_ticket event](https://open.feishu.cn/document/server-docs/application-v6/event/app_ticket-events) delay mechanism, you need to wait about 2 minutes before it can work normally.
