Configure IM Bot (Feishu / Lark / DingTalk) Permissions

When connecting an existing Feishu, Lark, or DingTalk custom app to Craepas, you need to grant the app the corresponding permissions on the open platform and complete publishing. Missing permissions cause message sending/receiving, group info resolution, or attachment import to fail.

Feishu / Lark

Required permissions

Configuration steps

  1. Log in to the open platform (Feishu open.feishu.cn / Lark open.larksuite.com) and open the target custom app.

  2. Open "Permission Management", search for and enable all permissions in the list above. You can also click the "Go to Feishu configuration" shortcut link ("Go to Lark configuration" for Lark apps) in Craepas's IM configuration panel to jump directly to the app permission page with the required permission list pre-filled.

  3. After permission changes, you need to "Create a version" and submit it for publishing; permissions take effect only after approval by the enterprise administrator.

Event subscription (long-connection mode)

Craepas receives events over a WebSocket long connection, so no public callback URL is needed. In the app's "Event Subscription", choose long-connection mode and add the following events:

Shortcut link format

The "Go to open platform to configure permissions" link in the IM configuration panel uses the following format (for Lark apps, replace the domain with open.larksuite.com):

https://open.feishu.cn/app/{appId}/auth?q=im:message,im:message:send_as_bot,im:resource,im:chat,im:chat:readonly,im:chat.group_info:readonly,im:chat.members:read&op_from=openapi&token_type=tenant

DingTalk

DingTalk apps created via one-click QR code scanning already have the following permissions and Stream message receiving mode preset, so no extra configuration is needed. You only need to check the configuration with the steps in this section when manually entering a custom app's Client ID / Client Secret via "Use an existing bot" in the IM configuration panel.

Required permissions

Configuration steps

  1. Log in to the DingTalk developer console (open-dev.dingtalk.com) and open the target enterprise internal app.

  2. Open "Permission Management", search for and enable the permissions in the list above (bot-related permissions are approval-free by default).

  3. In "App Capabilities → Bot", confirm the bot is enabled and the message receiving mode is set to Stream mode (Craepas receives messages over a long connection, so no public callback URL is needed).

  4. Publish the app in "Version Management and Publishing"; the bot takes effect once its status changes to published.

Notes

Verify the configuration

After publishing takes effect, go back to Craepas's IM configuration panel and send the bot a message and an image: receiving a reply means message permissions work; the image appearing as an attachment in the workbench means attachment download permission works (for Feishu / Lark this is the im:resource permission; for DingTalk it is the enterprise internal bot message sending permission).