# batchDownloadFile
Call this API at the server side. For more information, see Server API.
Gets the file download link
# Request Address
POST https://api.weixin.qq.com/tcb/batchdownloadfile?access_token=ACCESS_TOKEN
# Request Parameters
| Attribute | Type | Default | Required | Description |
|---|---|---|---|---|
| access_token | string | Yes | Credentials to call API | |
| env | string | Yes | Cloud environment ID | |
| file_list | Array.<Object> | Yes | File list |
file_list structure
| Attribute | Type | Default | Required | Description |
|---|---|---|---|---|
| fileid | string | Yes | File ID | |
| max_age | number | Yes | Validity period of the download link |
# Return Value
# Object
JSON data package that is returned
| Attribute | Type | Description |
|---|---|---|
| errcode | number | Error code |
| errmsg | string | Error message |
| file_list | Array.<Object> | File list |
Valid values of errcode
| Value | Description | Minimum Version |
|---|---|---|
| 0 | Request successful | |
| -1 | System Error | |
| -1000 | System Error | |
| 40014 | Invalid AccessToken | |
| 40097 | Invalid request parameter | |
| 40101 | Required parameter missing | |
| 41001 | AccessToken missing | |
| 42001 | AccessToken expired | |
| 43002 | HTTP METHOD error | |
| 44002 | Empty POST BODY | |
| 47001 | Incorrect format of POST BODY | |
| 85088 | Cloud Base is not enabled on this App | |
| Other error codes | Cloud Base error codes |
file_list structure
| Attribute | Type | Description |
|---|---|---|
| fileid | string | File ID |
| download_url | string | Download link |
| status | number | Status code |
| errmsg | string | Error message for this file |
# Request Data Example
{
"env": "test2-4a89da",
"file_list": [
{
"fileid":"cloud://test2-4a89da.7465-test2-4a89da/A.png",
"max_age":7200
}
]
}
# Return Data Example
{
"errcode": 0,
"errmsg": "ok",
"file_list": [
{
"fileid": "cloud://test2-4a89da.7465-test2-4a89da/A.png",
"download_url": "https://7465-test2-4a89da-1258717764.tcb.qcloud.la/A.png",
"status": 0,
"errmsg": "ok"
}
]
}