| | |
| | | } |
| | | return rsp; |
| | | } |
| | | |
| | | public OapiV2UserGetbymobileResponse getOapiV2UserGetbymobileResponse(String mobile, String accessToken) { |
| | | DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/user/getbymobile"); |
| | | OapiV2UserGetbymobileRequest req = new OapiV2UserGetbymobileRequest(); |
| | | req.setMobile(mobile); |
| | | req.setSupportExclusiveAccountSearch(true); |
| | | OapiV2UserGetbymobileResponse rsp = null; |
| | | |
| | | try { |
| | | rsp = client.execute(req, accessToken); |
| | | } catch (ApiException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return rsp; |
| | | } |
| | | } |