Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/extcontact/list |
| HTTP Method | POST |
| Supported app types | appType-Internal appappType-Third-party enterprise app |
| Required permissions | permission-qyapi_ext_read-Read permission for external contacts |
Query parameter
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | 6d1bxxxx | The app credential used to call this API. - For an internal app, obtain it by calling the API for getting the access_token of an internal app. - For a third-party enterprise app, obtain it by calling the API for getting the access_token of a third-party enterprise. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| size | Number | No | 20 | Supports paginated queries. This parameter takes effect only when set together with the offset parameter. It indicates the page size, with a maximum of 100. |
| offset | Number | No | 0 | Supports paginated queries. This parameter takes effect only when set together with the size parameter. It indicates the offset, starting from 0. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| results | OpenExtContact[] | The query result. | |
| title | String | Development Engineer | The job title. |
| share_dept_ids | Number[] | 1,2,3 | The list of shared department IDs. |
| label_ids | Number[] | 1,2,3 | The list of external contact tags. |
| remark | String | Alias content | The alias. |
| address | String | Address content | The address. |
| name | String | Zhang San | The name. |
| follower_user_id | String | 6767531692 | The userid of the owner. |
| state_code | String | 86 | The country code. |
| company_name | String | DingTalk | The company name. |
| share_user_ids | String[] | 042059613752 | The list of userids of employees with whom the contact is shared. |
| mobile | String | 13088888888 | The mobile phone number. Note This parameter is not returned for third-party enterprise apps. |
| userid | String | 0123456789 | The userid of the external contact. |
| String | 1@1.com | The mail address. | |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| request_id | String | 439eqp31da45 | The request ID. |
Response body example
Error codes
If an error is returned when you call this API, find the solution in the Global error codes document based on the error message.| Error code (errcode) | Error message (errmsg) | Solution |
|---|---|---|
| 33009 | Invalid tokenGrantType | Check whether the access_token is correct. |
| 40069 | Invalid size | Adjust the page size. |
| 40068 | Invalid offset | Adjust the offset. |
| 400001 | System error | Try again later. |