Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/convFile/conversations/files/links/send |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Required permissions | permission-ConvFile.File.Send-Group file send permission |
Request header
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. Obtain it by calling the Get the access token of an internal app API. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| unionId | String | Yes | The unionId of the operator. Obtain it by calling the Query user details API. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| spaceId | String | Yes | The ID of the space where the file is located. Obtain it by calling the Add a space API. |
| dentryId | String | Yes | The file ID. Obtain the value of the id parameter by calling the Get the list of files or folders API. |
| openConversationId | String | Yes | The openConversationId of the target chat. Obtain the value of the openConversationId parameter by calling the Create a group API. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| file | Object | The file link information sent to the target chat. |
| id | String | The file ID. |
| conversationId | String | The openConversationId of the chat where the file is located. |
| spaceId | String | The ID of the space where the file is located. |
| parentId | String | The ID of the parent folder where the file is located. The ID of the root folder is 0. |
| type | String | The file type. - FILE: file - FOLDER: folder |
| name | String | The file name. |
| size | Long | The file size, in bytes. |
| path | String | The file path. |
| version | Long | The file version number. |
| status | String | The file status. - NORMAL: normal - DELETED: deleted - EXPIRED: expired |
| extension | String | The file extension. |
| creatorId | String | The unionId of the file creator. |
| modifierId | String | The unionId of the file modifier. |
| createTime | String | The time when the file was created, in ISO 8601 format. Example: 2022-07-29T14:55Z. |
| modifiedTime | String | The time when the file was last modified, in ISO 8601 format. Example: 2022-07-29T14:55Z. |
| uuid | String | The identifier field. |
Response body example
Error codes
If an error occurs when you call this API, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | paramError | %s | Parameter error |
| 400 | paramError.spaceId | %s | Parameter error - spaceId |
| 400 | paramError.dentryId | %s | Parameter error - dentryId |
| 400 | paramError.conversationId | %s | Parameter error - conversationId |
| 403 | permissionDenied | %s | The user lacks the permission to add files to the storage space of the target chat |
| 404 | conversationNotExist | %s | The target chat does not exist |
| 500 | systemError | %s | System error |
| 500 | unknownError | Unknown Error | Unknown error |