OceanBase OAgent supports interacting with assistants through three channels: DingTalk, Lark, and WeCom. After configuration, you can directly use the intelligent chat capabilities of OceanBase OAgent in the bot.
Prerequisites
Before configuration, ensure that you have created the corresponding bot application on the respective channel platform (DingTalk, Lark, or WeCom) and obtained the necessary authentication information (such as APP ID and APP Secret).
Obtain APP ID and APP Secret
Log in to the DingTalk Open Platform and go to the developer backend.
Click Application Development > Create Application, and enter the application name and description.
After successful creation, on the application details page, under the Credentials and Basic Information section, obtain the Client ID and Client Secret.
In the left-side menu, select Add Application Capability and add the Bot capability.
On the bot configuration page, enable the bot configuration feature, fill in required fields such as the bot name. The message reception mode is set to Stream by default. Click Publish.
In the left-side menu, select Permission Management and add the following permissions:
Card.Streaming.WriteCard.Instance.Writeqyapi_robot_sendmsg
In the left-side menu, select Version Management and Publishing > Create New Version, enter the version number and description, select the application visibility scope, then click Save to apply for online publishing.
Use the bot in the DingTalk client:
- For private chats: Search for the created bot name in the top search bar of DingTalk to enter the private chat interface. Send a message to converse with the bot.
- For group chats: Enter a group chat (ensuring the group's organization matches the one where the bot was created), click Group Settings > Bots > Add Bot, search for and add the created bot, then use @bot to trigger automatic replies.
Note
Ensure the bot has been published and the application deployment is complete. If the bot cannot be found in a group chat, check whether the group's organization matches the one where the bot was created, or confirm whether the group chat is an internal group.
For detailed configuration steps, see Manually configure an OpenClaw bot.
Log in to the Lark Open Platform and go to the developer backend.
Click Create Enterprise Self-Built Application, enter the application name and description, then click Create.
After the creation is complete, go to the application details page and click Add Robot capability under Add Application Capability.
On the left-side Permission Management page, select Batch Import, paste the above JSON code, and click Confirm New Permission. Grant the following permissions:
Minimum permission configuration:
im:message im:chat contact:user.base:readonlyBatch import permission configuration (recommended):
{ "scopes": { "tenant": [ "aily:file:read", "aily:file:write", "application:application.app_message_stats.overview:readonly", "application:application:self_manage", "application:bot.menu:write", "cardkit:card:read", "cardkit:card:write", "contact:user.employee_id:readonly", "corehr:file:download", "event:ip_list", "im:chat.access_event.bot_p2p_chat:read", "im:chat.members:bot_access", "im:message", "im:message.group_at_msg:readonly", "im:message.p2p_msg:readonly", "im:message:readonly", "im:message:send_as_bot", "im:resource" ], "user": [ "aily:file:read", "aily:file:write", "im:chat.access_event.bot_p2p_chat:read" ] } }Click Version Management and Release > Create Version, enter the version number and update description, choose whether to share it externally if needed, click Apply for Online Release, and wait for the administrator's approval.
After approval, return to the application's Credentials and Basic Information page to obtain the App ID and App Secret.
Back in the Lark developer console, go to Events and Callbacks configuration. Click Subscription Method under Event Configuration, enable the Long Connection event subscription method, and add events: at least add Receive Message, and you can add other events as needed (such as bot joining a group, being removed from a group, etc.). After configuring the events, click Version Management and Release > Create Version to publish the new version and make the configuration effective.
Use the bot in the Lark client:
For private chat: Search for the created bot name in the top search bar of Lark, enter the private chat interface, and send messages to converse with the bot.
For group chat: Enter a group chat, click Group Settings > Group Chatbot > Add Chatbot, search for and add the created bot, then use @bot to trigger automatic replies.
Note
Ensure the bot has been published and event subscription configuration is complete. Private chat usage may require pairing verification. For details, see Lark Chatbot Configuration Guide.
Log in to the WeCom Admin Console and click Security and Management > Management Tools in the left navigation pane. Select Smart Bots > Create Bot.
At the bottom of the page, select Create by API Mode and click Visibility Scope to add members or departments that can use this bot.
In the API configuration section, select the connection method: Use Long Connection: You can receive messages and return results without a domain name or IP address. Use the SDK to initiate a long connection, configure the Bot ID and Secret to connect to the smart bot.
Obtain the Bot ID in the configuration method section and click to get the Secret.
Click Save to complete the bot creation.
Use the bot in the WeCom client:
For private chat: Search for the created bot name in the top search bar of WeCom, enter the private chat interface, and send messages to converse with the bot.
For group chat: Enter an internal group chat, click Group Settings > Add Bot, search for and add the created bot, then use @bot to trigger automatic replies.
Note
Ensure the chatbot has been published and the application deployment is complete. Intelligent chatbots are currently supported only in internal group chats; external groups are not supported. For detailed configuration steps, see WeCom Intelligent Chatbot User Guide.
Configure the OceanBase OAgent channel
Log in to the OceanBase Cloud console.
In the top-right navigation pane, click OceanBase OAgent. The OceanBase OAgent dialog box appears.
Click the settings button in the top-right navigation pane, select the channel you want to configure (DingTalk, Lark, or WeCom), and click + Add.
On the configuration page that appears, enter the following information:
APP ID: Enter the APP ID of the corresponding platform application.
APP Secret: Enter the APP Secret of the corresponding platform application.
User ID Allowlist: Enter user IDs, separating multiple IDs with half-width commas. If left empty, all users can access.
Click OK to complete the configuration. After configuration, you can directly use the intelligent dialogue capabilities of OceanBase OAgent in the chatbot.
