larksuite / larksuite/oapi-sdk-java

Attendance v1 user_settings/query 接口为 GET + Request Body,但 SDK 调用时报错:method GET must not have a request body

Open
#178 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
310
Forks
115
PR merge metrics
No merged PRs in 30d

Description

飞书开放平台文档明确指出,批量查询用户人脸识别信息 使用 HTTP GET 方法,并要求在请求体(Request Body)中传入 JSON 参数user_ids

然而,在使用 Java SDK 调用该接口时:

QueryUserSettingReq req = QueryUserSettingReq.newBuilder()
    .employeeType(QueryUserSettingQueryUserSettingEmployeeTypeEnum.EMPLOYEENO)
    .queryUserSettingReqBody(QueryUserSettingReqBody.newBuilder().userIds(userIds).build())
    .build();

larkClient.attendance().v1().userSetting().query(req);

抛出异常:

java.lang.IllegalArgumentException: method GET must not have a request body.
``

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Attendance v1 userSetting().query entry point and the QueryUserSettingReq construction shown in the report. Inspect how the Java SDK builds the GET request with queryUserSettingReqBody, then reproduce the call and verify the request no longer fails with “method GET must not have a request body.”

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.