# 飞书服务端SDK java
**Repository Path**: jasonsang/oapi-sdk-java
## Basic Information
- **Project Name**: 飞书服务端SDK java
- **Description**: 飞书服务端SDK java
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 25
- **Forks**: 10
- **Created**: 2021-03-24
- **Last Updated**: 2025-08-22
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[**飞书,点这里**](README.zh.md) | Larksuite(Overseas)
- 如果使用的是飞书,请看 [**飞书,点这里**](README.zh.md) ,飞书与Larksuite使用的域名不一样,引用的文档地址也是不同的。(If you are using FeiShu, please see [**飞书,点这里**](README.zh.md) , Feishu and larksuite use different domain names and reference different document addresses.)
# LarkSuite open api SDK
## Overview
---
- Larksuite open platform facilitates the integration of enterprise applications and larksuite, making collaboration and
management more efficient.
- Larksuite development interface SDK, convenient call server API and subscribe server events, such as: Message & group,
address book, calendar, docs and others can
visit [larksuite open platform document](https://open.larksuite.cn/document/) ,Take a look at [REFERENCE].
## Run environment
---
- JDK 1.8+
## Install
---
```shell
com.larksuite.oapi
larksuite-oapi
1.0.5
```
## Explanation of terms
- Larksuite: the overseas name of lark, which mainly provides services for overseas enterprises and has an
independent [domain name address](https://www.larksuite.com/) .
- Development documents: reference to the open interface of the open platform **developers must see, and can use search
to query documents efficiently** . [more information](https://open.feishu.cn/document/) .
- Developer background: the management background for developers to develop
applications, [more introduction](https://open.larksuite.cn/app/) .
- Cutome APP: the application can only be installed and used in the
enterprise,[more introduction](https://open.larksuite.com/document/ukzMxEjL5MTMx4SOzETM/uEjNwYjLxYDM24SM2AjN) .
- Marketplace App:The app will be displayed in [App Directory](https://app.larksuite.com/) Display, each enterprise can
choose to install.

## Quick use
---
### Call API
#### Example of using "Custom App" to access [send text message](https://open.larksuite.com/document/uMzMyEjLzMjMx4yMzITM/ugDN0EjL4QDNx4CO0QTM) API
- Since the SDK has encapsulated the app_access_token、tenant_access_token So when calling the business API, you don't need to get the app_access_token、tenant_access_token. If the business interface needs to use user_access_token, which needs to be set(Request.setUserAccessToken("UserAccessToken")), Please refer to README.md -> How to build a request(Request)
- For more use examples, please refer to [ApiSample.java](sample/src/main/java/com/larksuite/oapi/sample/api/ApiSample.java)
- Some of the old API do not have a direct SDK to use. They can use the `native` mode.
```java
package com.larksuite.oapi.sample.api;
import com.larksuite.oapi.core.AppSettings;
import com.larksuite.oapi.core.Config;
import com.larksuite.oapi.core.DefaultStore;
import com.larksuite.oapi.core.Domain;
import com.larksuite.oapi.core.api.AccessTokenType;
import com.larksuite.oapi.core.api.Api;
import com.larksuite.oapi.core.api.request.Request;
import com.larksuite.oapi.core.api.response.Response;
import com.larksuite.oapi.core.utils.Jsons;
import java.util.HashMap;
import java.util.Map;
public class Sample {
// Configuration of "Custom App", parameter description:
// AppID、AppSecret: "Developer Console" -> "Credentials"(App ID、App Secret)
// VerificationToken、EncryptKey:"Developer Console" -> "Event Subscriptions"(Verification Token、Encrypt Key)
public static final AppSettings appSettings = Config.createInternalAppSettings("AppID", "AppSecret", "VerificationToken", "EncryptKey");
// Currently, you are visiting larksuite, More optional configurations are as follows: config.NewConfig()
public static final Config config = new Config(Domain.LarkSuite, appSettings, new DefaultStore());
public static void main(String[] args) throws Exception {
// 发送消息的内容
Map message = new HashMap<>();
message.put("user_id", "77bbc392");
message.put("msg_type", "text");
Map content = new HashMap<>();
content.put("text", "java test");
message.put("content", content);
// Build request
Request