钉钉 根据手机号码获取userId OapiUserGetByMobileRequest导包 java
程序员文章站
2024-03-20 17:36:34
...
2.
<dependency>
<groupId>com.taobao.top</groupId>
<artifactId>top-api-sdk-dev</artifactId>
<version>ding-open-mc-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${pom.basedir}/lib/taobao-sdk-java-auto_1479188381469-20201222.jar</systemPath>
</dependency>
3.
public class Main {
public static void main(String[] args) {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/user/get_by_mobile");
OapiUserGetByMobileRequest req = new OapiUserGetByMobileRequest();
req.setHttpMethod("GET");
OapiUserGetByMobileResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
} catch (ApiException e) {
e.printStackTrace();
}
}
}
上一篇: 数据结构实验之查找四:二分查找