dingtalk.corp.emp.search (企业通讯录员工搜索)

钉钉企业通讯录搜索接口, 支持翻页

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
keyword String 可选 张三 搜索关键字
offset Number 可选 0 偏移量
size Number 可选 10 请求数量

响应参数

名称 类型 示例值 描述
result Json {"total":1,"hasMore":false,"list":[{"title":"职位","name":"钉钉","staffId":"1234"}]} 返回结果

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
DingTalkClient client = new DefaultDingTalkClient("https://eco.taobao.com/router/rest");
CorpEmpSearchRequest req = new CorpEmpSearchRequest();
req.setKeyword("张三");
req.setOffset(0L);
req.setSize(10L);
CorpEmpSearchResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<dingtalk_corp_emp_search_response>
    <result>{&quot;total&quot;:1,&quot;hasMore&quot;:false,&quot;list&quot;:[{&quot;title&quot;:&quot;职位&quot;,&quot;name&quot;:&quot;钉钉&quot;,&quot;staffId&quot;:&quot;1234&quot;}]}</result>
</dingtalk_corp_emp_search_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部