Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchGetIdUserReq通过邮箱获取用户ID时,返回结果user_id字段为空 #143

Open
DukeCheung opened this issue Sep 15, 2024 · 0 comments

Comments

@DukeCheung
Copy link

    public static String getUserIdByEmail(String appId, String appSecret, String email) throws Exception {
        Client client = Client.newBuilder(appId, appSecret).openBaseUrl(BaseUrlEnum.FeiShu).build();
        BatchGetIdUserReq req = new BatchGetIdUserReq();
        req.setUserIdType("user_id");
        req.setBatchGetIdUserReqBody(BatchGetIdUserReqBody.newBuilder().emails(new String[]{email}).build());
        BatchGetIdUserResp resp = client.contact().user().batchGetId(req);
        return resp.getData().getUserList()[0].getUserId();
    }

结果:
image

但是通过手机号获取时就可以拿到userId了,我确认账号同时绑定了手机号和邮箱,并且邮箱也是我的个人邮箱。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant