Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/topapi/v2/user/getbymobile |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Required permissions | permission-qyapi_get_member_by_mobile-Permission to get basic user information by mobile number |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | be3Fxxxx | The app credential for calling this API. Obtain it through the API for getting the access_token of an internal app. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| mobile | String | Yes | 1*******543 | The mobile number of the user. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| request_id | String | 5w82ciuur781 | The request ID. |
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
| result | Object | The returned result. | |
| userid | String | zhangsan | The user ID of the employee. |
Response 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.| Error code (errcode) | Error message (errmsg) | Solution |
|---|---|---|
| 400002 | Invalid parameter | Make sure the parameters are filled in as required in the document above. |
| 40104 | Invalid mobile number in the organization | Check whether the mobile number is correct. |
| 60121 | User not found | Confirm that the information is filled in correctly. |
| -1 | System busy | Try again later. |