Lark App Setup

This document provides step-by-step instructions for creating a Lark Custom App and configuring all required settings (Redirect URL, Permissions, Scopes, Events & Callbacks).

1. Create a Lark Custom App

1.1 Open Lark Developer Console

  1. Select Developer Console

  2. Under Custom Apps, click Create Custom App


1.2 Fill in App Information

In the “Create custom app” window:

  • Name: e.g., CXG Bot

  • Description:

    This app is used to authenticate our Lark workspace with CX Genie. It allows the bot to receive messages, send automated replies, and support workflow automation.

  • Icon: Select from built-in icons or upload your own

  • Click Create

(image reference: Create custom app)


2. Retrieve App ID & App Secret

After the app is created:

  1. Open the app in Developer Console

  2. Go to Credentials & Basic Info

  3. Copy:

    • App ID

    • App Secret

You will need these values in CX Genie.


3. Add Redirect URL

CX Genie requires the Lark app to include a specific redirect URL for OAuth.

3.1 Open Security Settings

Navigate to:

Security Settings → Redirect URLs

3.2 Add Redirect URL

Paste the following URL:

https://app.cxgenie.ai/integrations/lark

Click Add and Publish Changes.


4. Configure Permissions & Scopes

Your Lark App must include several required OAuth scopes and message permissions.

4.1 Open Permissions & Scopes

Go to:

Permissions & Scopes → User Permissions / Tenant Permissions

4.2 Required Permissions

The following scopes must be added (examples below; full list depends on your use case):

  • offline_access

  • im:message

  • im:message:send_as_bot

  • im:chat:read

  • docs:document.content:read

  • contact:user.base:readonly

  • wiki:node:read

These scopes are also included in your uploaded export file:

9KB
Open

Note: Some scopes require Admin Approval before they become active.

Click Save and Publish.


5. Configure Events

CX Genie requires message events to be pushed to the webhook.

5.1 Open Events & Callbacks

Navigate to:

Events & Callbacks → Event Configuration

5.2 Request URL (Webhook)

Set the request URL to:

https://api.cxgenie.ai/api/v1/lark/webhook


6. Configure Callback Settings

Callback settings are used for Lark interactive components (e.g., card buttons).

6.1 Open Callback Configuration

Navigate to:

Events & Callbacks → Callback Configuration

6.2 Add Callback URL

Use the same URL:

https://api.cxgenie.ai/api/v1/lark/webhook

7. Publish the App

To activate all configurations:

  1. Go to Version Management & Release

  2. Click Create Version (if needed)

  3. Submit for release

  4. Admin must approve the app if required

Once published, your Lark App is ready for use.

Last updated