Skip to main content
Before calling Contacts-related APIs, you must add the Contacts API permission. Use this API to get the Contacts permission scope.

API call description

The API described in this topic is a legacy Server API. For details about how to call it, see Legacy APIs vs. new APIs.
For Contacts-related APIs, the admin must first apply for the corresponding API permissions in the DingTalk Developer Console and specify which Contacts scopes these APIs can access. As shown in the figure below, the access_token of the current app only has the Contacts permission for managing department A. Developers can call this API first to view the Contacts authorization scope of the app. When calling Contacts APIs, developers can only retrieve employee Contacts information within the authorized scope. Attempting to retrieve employee Contacts information outside the authorized scope returns the error The department or employee is not within the authorization scope.

Request

Query parameters

Request example

Java
Python
PHP
C#

Response

Response body

Response body example

Error codes

If an error occurs when calling this API, refer to the Global error codes document for solutions based on the error message.