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: clearQuota
This interface is used to clear the daily call limit for server-side APIs using the access_token.
App types that can use this function 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?access_token=ACCESS_TOKEN
Encryption Support: This API supports secondary encryption and signature for service communication, which can effectively prevent data tampering and leakage. View Details
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 | Description |
|---|---|---|---|
| access_token | string | Yes | API call credential, you can use access_token, component_access_token, authorizer_access_token |
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| appid | string | Yes | The appid of the account for which the quota is to be cleared. |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error code. |
| errmsg | string | Error message. |
4. Notes
- To clear the quota for an Official Account’s API, use its access_token. For a Mini Program’s API, use its Mini Program access_token. For a Third-party Platform’s API, use its Component access_token, and so on.
- If a third-party service provider is clearing the quota on behalf of an Official Account, Service Account, Mini Program, WeChat Shop, Sales Assistant, or Video Account Assistant, use the Authorizer access_token.
- Each account has a total of 10 quota reset attempts per month. Each successful reset consumes one attempt. When a third party makes a reset on behalf of an Official Account, Service Account, Mini Program, WeChat Shop, Sales Assistant, or Video Account Assistant, it actually uses the account’s own quota.
- Due to differences in metric calculation methods or statistical timing, there may be slight discrepancies in real-time call data, usually within 1%.
5. Code Example
Request Example
{
"appid": "wx448f04719cd48f69"
}
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 |
|---|---|---|
| 0 | ok | ok |
| 40013 | invalid appid | The provided AppID is invalid. Developers should check the correctness of the AppID, ensuring no special characters are present and paying attention to case sensitivity. |
| 48006 | forbid to clear quota because of reaching the limit | The API prohibits resetting the call limit if it has already reached the maximum allowed number of resets. |
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。