Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/sns/getuserinfo_bycode |
| HTTP Method | POST |
| Supported app types | appType-Internal appappType-Third-party enterprise app |
| Permissions | permission-open_app_api_base-Basic permission to obtain the user access credential for DingTalk open APIs |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| accessKey | String | Yes | The AppId of the app. |
| timestamp | String | Yes | The current timestamp, in milliseconds. |
| signature | String | Yes | The signature value calculated using the HmacSHA256 algorithm, with timestamp+“\n”+AppSecret as the signature string and AppSecret as the signing key. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| tmp_auth_code | String | Yes | The silent login authorization code granted by the user to the DingTalk open app. Obtain it by calling the JSAPI dd.getAuthCode. See silent login authorization code for details. |
Request example
Response
Response body example
Error codes
If an error occurs when calling this API, refer to the global error codes document to find a solution based on the error message.| Error code | Description |
|---|---|
| 853002 | The timestamp parameter is invalid. The value differs from the current time on the DingTalk server by more than 1 minute. |
| 853001 | The timestamp parameter format is incorrect. It must be the current time in milliseconds. |
| 853003 | The accessKey parameter is invalid. It must be an appId that exists on the DingTalk Open Platform. |
| 853004 | The signature parameter is incorrect and does not match the signature calculated by the DingTalk server. Note that this parameter must be urlEncoded when passed. |