Resetting API Call Limits Using AppSecret

View llm.txt

Last edited on 2026-03-16

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

ParameterTypeRequiredDescription
appidstringYesThe appid of the account whose limits need to be cleared
appsecretstringYesUnique authentication key, i.e., AppSecret

3. Response Parameters

Response Body Response Payload

ParameterTypeDescription
errcodenumberError code
errmsgstringError message

4. Notes

  1. 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.

  2. 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.

  3. Due to differences in metric calculation methods or statistical timing, there may be slight discrepancies in real-time call data, generally within 1%.

  4. This interface only supports POST requests.

  5. 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 CodeError DescriptionSolution
-1system errorThe system is busy. Developers are advised to try again later.
40013invalid appidInvalid AppID. Developers should check the correctness of the AppID, avoiding special characters and paying attention to case sensitivity.
41002appid missingThe appid parameter is missing.
41004appsecret missingThe secret parameter is missing.
48006forbid to clear quota because of reaching the limitThe API does not allow resetting call limits because the limit has already been reached.

7. Applicable Scope

API callable status for different account types:
Mini ProgramOfficial AccountService AccountMini GameWeChat ShopAlliance AgencyInfluencerShop SupplierMobile AppWebsite AppChannels WindowMulti-platform App
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
  • ✔:This account type can call this API。
  • Other account types not explicitly declared cannot call this API unless otherwise specified.