# Lark Developer

> Lark is an advanced enterprise collaboration and management platform that integrates instant messaging, calendar, cloud documents, video conferencing, and more in one stop. Through smooth communication and efficient collaboration, it helps enterprises or team organizations upgrade. The Lark Developer is based on the numerous OpenAPIs exposed by Lark, helping Lark client enterprises integrate their own systems with Lark, breaking down barriers between systems, and making information transmission more efficient.

## Lark Developer 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 Lark.

- 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 Lark App Directory and can be installed and used by all Lark tenants.

- Application forms: Based on capability forms, Lark apps are mainly classified into [Bots](https://open.larksuite.com/document/client-docs/bot-v3/bot-overview), [Web apps](https://open.larksuite.com/document/client-docs/h5/introduction), and Widgets ([Docs add-on](https://open.larksuite.com/document/uAjLw4CM/uYjL24iN/docs-add-on/overview), [Bitable plugin](https://open.larksuite.com/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/bitable-overview), [Workplace widget](https://open.larksuite.com/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace-block/overview)). You can also develop backend-only service apps.

**App authentication**

- **API permissions (scopes)**: In the process of developing an application, you may need to call server-side APIs or listen to subscribed events. Such operations may involve accessing the privacy information of the enterprise or users, or may need to operate on the application data of the enterprise or users. For security reasons, you need to apply for corresponding permissions for the application, and only after the enterprise administrator approves can the application proceed with subsequent API calls or event listening. [Apply for API permissions](https://open.larksuite.com/document/server-docs/getting-started/overview-of-app-scopes)

- **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.larksuite.com/document/server-docs/getting-started/api-access-token/auth-v3/tenant_access_token_internal)
    - 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.larksuite.com/document/common-capabilities/sso/web-application-end-user-consent/guide)
- **App availability**: The application availability scope defines which user groups (departments, individuals) can use the application, while other members cannot use the application, thereby achieving permission control. [Configure app availability](https://open.larksuite.com/document/home/introduction-to-scope-and-authorization/availability)

- **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, Lark 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. [Configure app data permissions](https://open.larksuite.com/document/home/introduction-to-scope-and-authorization/configure-app-data-permissions)

**Event and callback subscriptions**

- **Event subscriptions**: Through event subscription, applications can respond to change events in Lark in a timely manner. When an event occurs, the open platform will send event messages according to the subscription method you configured. [Event overview](https://open.larksuite.com/document/server-docs/event-subscription/overview-of-event-subscription)

- **Callbacks**: Callbacks are suitable for business scenarios that require synchronous response to user behavior. That is, when a user triggers certain operations on Lark, 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. [Callback overview](https://open.larksuite.com/document/server-docs/event-subscription/overview-of-event-subscription)

**Subscription methods**

- **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. [Send events to developer server](https://open.larksuite.com/document/server-docs/event-subscription/overview-of-event-subscription)

**Server SDKs**

Lark Developer provides server-side SDKs, which handle the acquisition and maintenance of access tokens, data encryption and decryption, and request signature verification logic internally. It supports a complete type system and provides semantic programming interfaces externally to improve the actual coding experience.

- [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.larksuite.com/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.larksuite.com/document/server-docs/getting-started/api-access-token/get-access-token). 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.larksuite.com/document/server-docs/getting-started/overview-of-app-scopes). 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.larksuite.com/document/server-docs/getting-started/api-access-token/get-). 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
- [Home](https://open.larksuite.com/llms-docs/en-US/llms-home.txt)
- [Developer Guides](https://open.larksuite.com/llms-docs/en-US/llms-developer-guides.txt)
- [API Call Guide](https://open.larksuite.com/llms-docs/en-US/llms-api-call-guide.txt)
- [Events and callbacks](https://open.larksuite.com/llms-docs/en-US/llms-events-and-callbacks.txt)
- [Authenticate and Authorize](https://open.larksuite.com/llms-docs/en-US/llms-authenticate-and-authorize.txt)
- [Deprecated Version (Not Recommended)](https://open.larksuite.com/llms-docs/en-US/llms-deprecated-version-(not-recommended).txt)
- [Contacts](https://open.larksuite.com/llms-docs/en-US/llms-contacts.txt)
- [Messaging](https://open.larksuite.com/llms-docs/en-US/llms-messaging.txt)
- [Group Chat](https://open.larksuite.com/llms-docs/en-US/llms-group-chat.txt)
- [Feed](https://open.larksuite.com/llms-docs/en-US/llms-feed.txt)
- [Docs](https://open.larksuite.com/llms-docs/en-US/llms-docs.txt)
- [Calendar](https://open.larksuite.com/llms-docs/en-US/llms-calendar.txt)
- [Video Conferencing](https://open.larksuite.com/llms-docs/en-US/llms-video-conferencing.txt)
- [Attendance](https://open.larksuite.com/llms-docs/en-US/llms-attendance.txt)
- [Approval](https://open.larksuite.com/llms-docs/en-US/llms-approval.txt)
- [Bot](https://open.larksuite.com/llms-docs/en-US/llms-bot.txt)
- [Tasks v2](https://open.larksuite.com/llms-docs/en-US/llms-tasks-v2.txt)
- [Email](https://open.larksuite.com/llms-docs/en-US/llms-email.txt)
- [App Information](https://open.larksuite.com/llms-docs/en-US/llms-app-information.txt)
- [Company Information](https://open.larksuite.com/llms-docs/en-US/llms-company-information.txt)
- [Personal Settings](https://open.larksuite.com/llms-docs/en-US/llms-personal-settings.txt)
- [AI](https://open.larksuite.com/llms-docs/en-US/llms-ai.txt)
- [Admin](https://open.larksuite.com/llms-docs/en-US/llms-admin.txt)
- [OKR](https://open.larksuite.com/llms-docs/en-US/llms-okr.txt)
- [security_and_compliance](https://open.larksuite.com/llms-docs/en-US/llms-security_and_compliance.txt)
- [Minutes](https://open.larksuite.com/llms-docs/en-US/llms-minutes.txt)
- [Workplace](https://open.larksuite.com/llms-docs/en-US/llms-workplace.txt)
- [Web app](https://open.larksuite.com/llms-docs/en-US/llms-web-app.txt)
- [Gadget Basic Components (Not Recommended)](https://open.larksuite.com/llms-docs/en-US/llms-gadget-basic-components-(not-recommended).txt)
- [Blocks](https://open.larksuite.com/llms-docs/en-US/llms-blocks.txt)
- [Docs Add-ons](https://open.larksuite.com/llms-docs/en-US/llms-docs-add-ons.txt)
- [Base Extension](https://open.larksuite.com/llms-docs/en-US/llms-base-extension.txt)
