钉钉官方提供了统一的SDK,使用SDK可以便捷的调用服务端各API。注意:此SDK包含原有TOP接口,原有TOP接口可以继续正常调用,没有影响。下面是使用SDK调用API的请求示例:
JAVA:
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/user/get");
OapiUserGetRequest req = new OapiUserGetRequest();
req.setUserid("userid1");
req.setHttpMethod("GET");
OapiUserGetResponse rsp = client.execute(req, accessToken);
2021-09-18 15:15:10
2.44MB
ding
1