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
im:message: receive and send messages (including replying to messages and updating task progress cards).im:message:send_as_bot: proactively send messages as the app.im:resource: download image and file attachments in messages, used to import attachments into the workbench.im:chat,im:chat:readonly: get group information.im:chat.group_info:readonly: get basic info such as the group name, used to show the source group in the configuration panel.im:chat.members:read: get the group member list, used to resolve sender nicknames.
Configuration steps
-
Log in to the open platform (Feishu
open.feishu.cn/ Larkopen.larksuite.com) and open the target custom app. -
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.
-
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:
im.message.receive_v1: receive messages (required).card.action.trigger: card button callbacks, used for task progress card interactions.im.chat.member.bot.added_v1: notified when the bot is added to a group chat.
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
- Enterprise internal bot message sending permission (permission point
Robot.Message.Write, required): receive and reply to messages, download image and file attachments in messages, and proactively push task progress. - Interactive card instance write permission (permission point
Card.Instance.Write): reply with interactive cards and stream updates (typewriter effect). Without it, replies automatically degrade to plain markdown messages; basic sending and receiving are unaffected.
Configuration steps
-
Log in to the DingTalk developer console (
open-dev.dingtalk.com) and open the target enterprise internal app. -
Open "Permission Management", search for and enable the permissions in the list above (bot-related permissions are approval-free by default).
-
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).
-
Publish the app in "Version Management and Publishing"; the bot takes effect once its status changes to published.
Notes
- In group chats, the bot only receives messages when
@-mentioned (platform behavior, not a configuration issue). - Audio and video messages cannot be imported yet (same as Feishu / Lark); an unsupported notice is returned.
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).