复制文件
POST
https://open.feishu.cn/open-apis/drive/v1/files/{file_token}/copy
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
500 | 1061001 | internal error. | 服务内部错误,包括超时,错误码没处理。 |
400 | 1061002 | params error. | 请检查请求参数是否正确。 |
404 | 1061003 | not found. | 请确认对应资源是否存在。 |
403 | 1061004 | forbidden. | 请确认当前身份是否有对应上传节点的的权限,如用户是否有上传到指定doc的编辑权限。 |
401 | 1061005 | auth failed. | 请使用正确身份访问该接口。 |
404 | 1061007 | file has been delete. | 请确认对应节点未被删除。 |
400 | 1061045 | can retry. | 内部可重试错误,请稍后重试。 |
400 | 1062507 | parent node out of sibling num. | 云空间目录下挂载数量超过限制(单层1500限制 )。 |
403 | 1064510 | cross tenant and unit not support. | 不支持跨租户跨地域的请求。 |
403 | 1064511 | cross brand not support. | 不支持跨品牌的请求。 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/drive/v1/files//copy' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "name",
"type": "file",
"folder_token": "fldbcO1UuPz8VwnpPx5a92abcef"
}'
响应示例响应示例
{
"code": 0,
"data": {
"file": {
"name": "name",
"parent_token": "fldcnBh8LrnX42dr1pBYclabcef",
"token": "doxcnUkUOWtOelpFcha2Z9abcef",
"type": "docx",
"url": "https://bytedance.feishu.cn/docx/doxcnUkUOWtOelpFcha2Zabcef"
}
},
"msg": "success"
}
请求参数
Path 参数
file_token
string
必需
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-01-13 05:49:27