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: clearQuotaByAppSecret
This interface is used to clear the daily call limit for server-side APIs using the AppSecret.
Account types that can use this interface include: Official Accounts, Service Accounts, Mini Programs, Mini Games, WeChat Shops, Sales Assistants, Video Account Assistants, Alliance Sales Agencies, Mobile Apps, Web Apps, Multi-Platform Apps, and Third-Party Platforms.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/cgi-bin/clear_quota/v2
Cloud Call
- This API does not support cloud call.
Third-party Call
- This API does not support third-party platform calls.
2. Request Parameters
Query Parameters Query String Parameters
None
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| appid | string | Yes | The appid of the account whose limits need to be cleared |
| appsecret | string | Yes | Unique authentication key, i.e., AppSecret |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error code |
| errmsg | string | Error message |
4. Notes
-
This interface uses the appsecret for calls, solving the issue of being unable to call "reset API call limits" due to exhaustion of the access_token.
-
Each account has a total of 10 opportunities per month to reset API call limits using this interface. Each reset counts as one usage opportunity.
-
Due to differences in metric calculation methods or statistical timing, there may be slight discrepancies in real-time call data, generally within 1%.
-
This interface only supports POST requests.
-
If you need to clear the call limits for the Token Acquisition Interface or to clear the call limits for Official Accounts or Mini Programs on behalf of a Merchant as a service provider, you should use the Resetting Third-Party Platform API Call Limits Using AppSecret Interface.
5. Code Example
Request Example
POST https://api.weixin.qq.com/cgi-bin/clear_quota/v2?appid=wx888888888888&appsecret=xxxxxxxxxxxxxxxxxxxxxxxx
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 |
|---|---|---|
| -1 | system error | The system is busy. Developers are advised to try again later. |
| 40013 | invalid appid | Invalid AppID. Developers should check the correctness of the AppID, avoiding special characters and paying attention to case sensitivity. |
| 41002 | appid missing | The appid parameter is missing. |
| 41004 | appsecret missing | The secret parameter is missing. |
| 48006 | forbid to clear quota because of reaching the limit | The API does not allow resetting call limits because the limit has already been reached. |
7. Applicable Scope
| Mini Program | Official Account | Service Account | Mini Game | WeChat Shop | Alliance Agency | Influencer | Shop Supplier | Mobile App | Website App | Channels Window | Multi-platform App |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
- ✔:This account type can call this API。
- Other account types not explicitly declared cannot call this API unless otherwise specified.