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: clearApiQuota
This interface uses access_token to reset the daily call limit for a specific API
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/cgi-bin/openapi/quota/clear?access_token=ACCESS_TOKEN
Cloud Call
- This API does not support cloud call.
Third-party Call
-
This API supports third-party platforms to call using component_access_token, and also supports calling on behalf of Merchant call.
-
After the service provider obtains any permission set authorization, 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 | Example | Description |
|---|---|---|---|---|
| access_token | string | Yes | ACCESS_TOKEN | API call credential, you can use access_token, component_access_token, authorizer_access_token |
Request Body Request Payload
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| cgi_path | string | Yes | /channels/ec/basics/info/get | The request address for the API. The cgi_path must start with "/channels/ec/", without the prefix "https://api.weixin.qq.com" or missing the "/". |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Example | Description |
|---|---|---|---|
| errcode | number | 0 | Error code |
| errmsg | string | ok | Error message |
4. Notes
- Can be used to reset interfaces for Mini Programs, official accounts, WeChat stores, and other WeChat development ecosystem services. The cgi_path must start with "/", for example, "/channels/ec/".
- If a third-party service provider is clearing the quota, authorizer_access_token must be used.
- Each account has a total of 50 quota reset attempts per month. Each reset consumes one attempt.
- Due to differences in metric calculation methods or statistical timing, there may be slight discrepancies in real-time call volume data, generally within 1%.
5. Code Example
Request Example
{
"cgi_path":"/channels/ec/basics/info/get"
}
Response Example
{
"errcode": 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 |
|---|---|---|
| 40001 | invalid credential access_token isinvalid or not latest | The access_token is invalid or not the latest obtained access_token. Developers should verify the validity of the access_token. |
| 41001 | access_token missing | The access_token parameter is missing. |
| 42001 | access_token expired | The access_token has expired. Please check the validity period of the access_token. For detailed information on the access_token mechanism, refer to Basic Support - Obtaining Access_token. |
| 44002 | empty post data | The POST data packet is empty. The post request body parameter cannot be empty. |
| 45009 | reach max api daily quota limit | Exceeded the daily API call limit. |
| 50002 | user limited | User restrictions: The user account may be frozen or deleted. |
| 76021 | cgi_path not found, please check | Incorrect cgi_path was entered. |
| 76022 | could not use this cgi_path,no permission | The token used for the current API call does not match the account to which the API belongs. For details, see the notes section. |
7. Applicable Scope
| Mini Program | Official Account | Service Account | Mini Game | WeChat Shop | Alliance Agency | Influencer | Shop Supplier | Third-party Platform | Mobile App | Website App | Channels Window | Multi-platform App |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | 〇 | ✔ | ✔ | ✔ | ✔ |
- ✔:This account type can call this API。
- 〇:Third-party platforms can use component_access_token to call. For calling on behalf of Merchant, please refer to the Call Method section。