# Feishu Open Platform

> Feishu provides comprehensive and in-depth capabilities as an information hub, integrating with existing IT ecosystems of enterprises, supporting and complementing existing IT systems, enhancing digital efficiency, and helping businesses to build a one-stop collaboration platform. This allows employees to focus on their work, making tasks simpler, and provides IT personnel with agile development and a delightful experience.

## Feishu Open Platform Capabilities

**Application**: Applications are the means by which developers provide services to internal or external users. They are typically manifested as robots, web pages, mini-programs, and other forms, and serve as the vehicle for developers to access the open capabilities provided by Feishu.

- Application type

- Custom Apps: Developed by internal personnel or authorized developers within an enterprise, these apps can only be published and used within the same enterprise.
- Store Apps: Developed by third-party service providers, these apps are published in the Feishu App Directory and can be installed and used by all Feishu tenants.

- Application forms: Based on capability forms, Lark apps are mainly classified into [Bots](https://open.feishu.cn/document/client-docs/bot-v3/bot-overview.md), [Web apps](https://open.feishu.cn/document/client-docs/h5/introduction), and Widgets ([Docs add-on](https://open.feishu.cn/document/client-docs/docs-add-on/docs-add-on-introduction.md), [Bitable plugin](https://open.feishu.cn/document/base-extensions/base-extension-introduction.md), [Workplace widget](https://open.feishu.cn/document/client-docs/block/hosting-scenario-introduction/workplace.md)). You can also develop backend-only service apps.

**App authentication**

- **API permissions (scopes)**: Defines which Feishu APIs an app can call. API permissions are granted per app, with each managing its own interfaces. If multiple applications need to call the same API, each application needs to add the corresponding API permission. [Learn more](https://open.feishu.cn/document/server-docs/application-scope/introduction.md)

- **Access tokens (access_token)**
- tenant_access_token: The credentials required to call the API as an app. The range of readable and writable data is determined by the app's own data permission range. This access credential is suitable for automated operations that do not require user login, such as when the application bot calls the Send Message API to push message notifications to a specified conversation. [Get tenant_access_token for custom app](https://open.feishu.cn/document/server-docs/authentication-management/access-token/tenant_access_token_internal.md)
- user_access_token: The credentials required when calling the API as a user. The range of readable and writable data is determined by the user's data permission range. This access credential is applicable for operations performed on behalf of the user after authorization login, such as calling the Create Bitable API with the user_access_token. The owner of the created Bitable will be the user corresponding to the user_access_token. Obtaining user_access_token follows standard OAuth 2.0. [Learn more](https://open.feishu.cn/document/sso/web-application-end-user-consent/guide.md)
- **App availability**: Defines which users can see and use the app within Feishu. [Learn more](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/availability.md)

- **Data permissions**: App data permission refers to the scope of data accessible when accessing business resources with the app identity (tenant_access_token). After the app has applied for some app identity permissions (for example, Contacts, Feishu CoreHR Enterprise Edition), you also need to configure the corresponding data permissions and submit a review request. The permissions will take effect upon approval, allowing successful API calls to retrieve data. Otherwise, calling the API will result in a permission error. [Learn more](https://open.feishu.cn/document/api-call-guide/calling-process/configure-app-data-permissions.md)

**Event and callback subscriptions**

- **Event subscriptions**: Through event subscription, applications can respond to change events in Feishu in a timely manner. When an event occurs, the open platform will send event messages according to the subscription method you configured. [Learn more](https://open.feishu.cn/document/server-docs/event-subscription-guide/overview.md)

- **Callbacks**: Callbacks are suitable for business scenarios that require synchronous response to user behavior. That is, when a user triggers certain operations on Feishu, the front-end loads and waits for the server to return response data. When the server returns the response result, the front-end loading is completed and the returned response result is displayed to the user. [Learn more](https://open.feishu.cn/document/event-subscription-guide/callback-subscription/callback-overview.md)

- **Subscription methods**

- **Use persistent connection to receive callbacks**: allowing you to establish a WebSocket full-duplex channel between your server and the Open Platform (your server needs to be able to access the public internet). When the subscribed event occurs, the Open Platform will send a message to your server via this channel. For detailed configuration instructions [Learn more](https://open.feishu.cn/document/server-docs/event-subscription-guide/event-subscription-configure-/request-url-configuration-case.md)

- **Send to developer server**: Traditional webhook mode, requiring you to provide a public internet address for receiving event messages. When the subscribed event occurs, the Open Platform will send an HTTP POST request to the public address of your server containing the event data. For detailed configuration instructions [Learn more](https://open.feishu.cn/document/event-subscription-guide/event-subscriptions/event-subscription-configure-/choose-a-subscription-mode/send-notifications-to-developers-server.md)

**Server SDKs**

Feishu Open Platform offers a series of server-side atomic APIs to achieve diverse functionalities. However, actual coding requires additional work, such as obtaining and maintaining access tokens, encrypting and decrypting data, and verifying request signatures. Furthermore, the lack of semantic descriptions for function calls and type system support can increase coding burdens.

- [oapi-sdk-go](https://github.com/larksuite/oapi-sdk-go)
- [oapi-sdk-python](https://github.com/larksuite/oapi-sdk-python)
- [oapi-sdk-java](https://github.com/larksuite/oapi-sdk-java)
- [oapi-sdk-nodejs](https://github.com/larksuite/node-sdk)

**Sample code**

- [lark-samples](https://github.com/larksuite/lark-samples)
- [oapi-sdk-go-demo](https://github.com/larksuite/oapi-sdk-go-demo)
- [oapi-sdk-python-demo](https://github.com/larksuite/oapi-sdk-python-demo)
- [oapi-sdk-java-demo](https://github.com/larksuite/oapi-sdk-java-demo)

**API call process**

1. Create an app. In the [Developer Console](https://open.feishu.cn/app), create custom apps or store apps according to actual needs. (Only ISV-qualified users can create store apps.)

2. [Obtain access tokens](https://open.feishu.cn/document/server-docs/api-call-guide/calling-process/get-access-token.md). When calling APIs, you must include access tokens in HTTP headers to retrieve resources within the permission scope.

3. [Apply for API scopes](https://open.feishu.cn/document/server-docs/application-scope/introduction.md). Different APIs have different interface scopes and field scopes. If you need to call an API, you must first apply for matching API scopes. If it involves accessing sensitive fields, you must also apply for scopes to access sensitive fields.

4. [Call APIs](https://open.feishu.cn/document/server-docs/api-call-guide/calling-process/get-.md). After you complete the above configuration steps according to your actual needs, you can start calling the API. For the specific introduction and parameter description of the API, see the corresponding API documentation.

## Docs
- [Developer Guides](https://open.feishu.cn/llms-docs/en-US/llms-developer-guides.txt)
- [Feishu Card](https://open.feishu.cn/llms-docs/en-US/llms-feishu-card.txt)
- [Developer Tutorials](https://open.feishu.cn/llms-docs/en-US/llms-developer-tutorials.txt)
- [API Call Guide](https://open.feishu.cn/llms-docs/en-US/llms-api-call-guide.txt)
- [Events and callbacks](https://open.feishu.cn/llms-docs/en-US/llms-events-and-callbacks.txt)
- [Server-side SDK](https://open.feishu.cn/llms-docs/en-US/llms-server-side-sdk.txt)
- [Authenticate and Authorize](https://open.feishu.cn/llms-docs/en-US/llms-authenticate-and-authorize.txt)
- [Contacts](https://open.feishu.cn/llms-docs/en-US/llms-contacts.txt)
- [Messaging](https://open.feishu.cn/llms-docs/en-US/llms-messaging.txt)
- [Group Chat](https://open.feishu.cn/llms-docs/en-US/llms-group-chat.txt)
- [Feed](https://open.feishu.cn/llms-docs/en-US/llms-feed.txt)
- [Organization Custom Group Label](https://open.feishu.cn/llms-docs/en-US/llms-organization-custom-group-label.txt)
- [Docs](https://open.feishu.cn/llms-docs/en-US/llms-docs.txt)
- [Deprecated Version (Not Recommended)](https://open.feishu.cn/llms-docs/en-US/llms-deprecated-version-(not-recommended).txt)
- [Calendar](https://open.feishu.cn/llms-docs/en-US/llms-calendar.txt)
- [Video Conferencing](https://open.feishu.cn/llms-docs/en-US/llms-video-conferencing.txt)
- [Attendance](https://open.feishu.cn/llms-docs/en-US/llms-attendance.txt)
- [Approval](https://open.feishu.cn/llms-docs/en-US/llms-approval.txt)
- [Bot](https://open.feishu.cn/llms-docs/en-US/llms-bot.txt)
- [Help Desk](https://open.feishu.cn/llms-docs/en-US/llms-help-desk.txt)
- [Tasks](https://open.feishu.cn/llms-docs/en-US/llms-tasks.txt)
- [Email](https://open.feishu.cn/llms-docs/en-US/llms-email.txt)
- [App Information](https://open.feishu.cn/llms-docs/en-US/llms-app-information.txt)
- [Company Information](https://open.feishu.cn/llms-docs/en-US/llms-company-information.txt)
- [Verification Information](https://open.feishu.cn/llms-docs/en-US/llms-verification-information.txt)
- [Personal Settings](https://open.feishu.cn/llms-docs/en-US/llms-personal-settings.txt)
- [Search](https://open.feishu.cn/llms-docs/en-US/llms-search.txt)
- [AI](https://open.feishu.cn/llms-docs/en-US/llms-ai.txt)
- [Feishu aPaaS](https://open.feishu.cn/llms-docs/en-US/llms-feishu-apaas.txt)
- [aily](https://open.feishu.cn/llms-docs/en-US/llms-aily.txt)
- [Admin](https://open.feishu.cn/llms-docs/en-US/llms-admin.txt)
- [Moments](https://open.feishu.cn/llms-docs/en-US/llms-moments.txt)
- [Feishu CoreHR - (Standard version)](https://open.feishu.cn/llms-docs/en-US/llms-feishu-corehr---(standard-version).txt)
- [Feishu People（Enterprise Edition）](https://open.feishu.cn/llms-docs/en-US/llms-feishu-people(enterprise-edition).txt)
- [Payroll](https://open.feishu.cn/llms-docs/en-US/llms-payroll.txt)
- [Hire](https://open.feishu.cn/llms-docs/en-US/llms-hire.txt)
- [OKR](https://open.feishu.cn/llms-docs/en-US/llms-okr.txt)
- [Identity Authentication](https://open.feishu.cn/llms-docs/en-US/llms-identity-authentication.txt)
- [Smart Access Control](https://open.feishu.cn/llms-docs/en-US/llms-smart-access-control.txt)
- [Performance](https://open.feishu.cn/llms-docs/en-US/llms-performance.txt)
- [Lingo](https://open.feishu.cn/llms-docs/en-US/llms-lingo.txt)
- [security_and_compliance](https://open.feishu.cn/llms-docs/en-US/llms-security_and_compliance.txt)
- [Minutes](https://open.feishu.cn/llms-docs/en-US/llms-minutes.txt)
- [Workplace](https://open.feishu.cn/llms-docs/en-US/llms-workplace.txt)
- [Feishu Master Data Management](https://open.feishu.cn/llms-docs/en-US/llms-feishu-master-data-management.txt)
- [Report](https://open.feishu.cn/llms-docs/en-US/llms-report.txt)
- [eLearning](https://open.feishu.cn/llms-docs/en-US/llms-elearning.txt)
- [Web app](https://open.feishu.cn/llms-docs/en-US/llms-web-app.txt)
- [Gadget Basic Components (Not Recommended)](https://open.feishu.cn/llms-docs/en-US/llms-gadget-basic-components-(not-recommended).txt)
- [Blocks](https://open.feishu.cn/llms-docs/en-US/llms-blocks.txt)
- [Docs Add-ons](https://open.feishu.cn/llms-docs/en-US/llms-docs-add-ons.txt)
- [Base Extension](https://open.feishu.cn/llms-docs/en-US/llms-base-extension.txt)
- [Organization](https://open.feishu.cn/llms-docs/en-US/llms-organization.txt)
- [Trust Party](https://open.feishu.cn/llms-docs/en-US/llms-trust-party.txt)
- [MCP](https://open.feishu.cn/llms-docs/en-US/llms-mcp.txt)
