This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.
API English Name: deleteTcbCloudFile
This API can be used to delete files. If you encounter any issues during use, you can post in the Open Platform Service Provider Zone to discuss.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/tcb/batchdeletefile?access_token=ACCESS_TOKEN
Cloud Call
- This API does not support cloud call.
Third-party Call
-
This API supports third-party platforms on behalf of Merchant call.
-
The permission set ID of this API is: 49
-
After the service provider obtains one of the permission set authorizations, it can use authorizer_access_token to call on behalf of Merchant, for details please refer to Third-party Call documentation.
2. Request Parameters
Query Parameters Query String Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | API call credential, you can use access_token, authorizer_access_token |
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| env | string | Yes | Cloud environment ID |
| fileid_list | array | Yes | List of file IDs |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error code |
| errmsg | string | Error message |
| delete_list | objarray | File list |
Res.delete_list(Array) Object Payload
File list
| Parameter | Type | Description |
|---|---|---|
| fileid | string | File ID |
| status | number | Status |
| errmsg | string | Error message |
4. Notes
No special notes for this API
5. Code Example
Request Example
{
"env": "test2-4a89da",
"fileid_list": [
"cloud://test2-4a89da.7465-test2-4a89da/A.png"
]
}
Response Example
{
"errcode": 0,
"errmsg": "ok",
"delete_list": [
{
"fileid": "cloud://test2-4a89da.7465-test2-4a89da/A.png",
"status": 0,
"errmsg": "ok"
}
]
}
6. Error Codes
The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.
| Error Code | Error Description | Solution |
|---|---|---|
| -501002 | Generic cloud resource error: Cloud response timeout | |
| -1000 | system error | System error |
| -1 | system error | The system is busy. Please try again later. |
| 0 | ok | ok |
| 40014 | invalid access_token | Invalid access_token. Please verify the validity of the access_token (e.g., whether it has expired) or check if the API is being called for the correct Official Account. |
| 40097 | invalid args | Invalid parameter |
| 40101 | missing parameter | Missing required parameter |
| 41001 | access_token missing | Missing access_token parameter |
| 42001 | access_token expired | access_token has expired. Please check the validity period of the access_token. Refer to the detailed mechanism description in Basic Support - Get access_token. |
| 43002 | require POST method | POST request required |
| 44002 | empty post data | The POST data package is empty. |
| 47001 | data format error | Failed to parse JSON/XML content; missing parameters in POST data. Please check and fix, then retry. |
| 85088 | no qbase privilege | Cloud development is not enabled for this APP. END |
7. Applicable Scope
This API supports 「Third-party Platform」 account type for proxy calls. For permission sets, please refer to the "Call Method" section. Other account types cannot call unless otherwise specified.