# Reset the number of API calls with AppSecret
Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide
Interface name: clearQuotaByAppSecret
This interface is used to empty Official Account / Service Account / Weixin Mini Program / MiniGame / Weixin Store / Delivery Assistant / Weixin Channels Assistant / Alliance Shipping Agency / Mobile App / Website App / Weixin Mini Program Wait for the number of interface calls per day.
# 1. How to call
# HTTPS calls
POST https://api.weixin.qq.com/cgi-bin/clear_quota/v2
# Cloud Calls
- This interface does not support cloud calls
# Third party invocation
- Third Party Platform calls are not supported by this interface.
# 2. Request parameters
# Query parametersQuery String parameters
nothing
# Request BodyRequest Payload
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
appid | string | yes | AppID of the account to be emptied |
appsecret | string | yes | Unique credential key, that is, AppSecret |
# 3. Return Parameters
# Response Payload
Parameter Name | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
# 4. Note
- This interface is called by appsecret, which solves the problem that accesses_token is exhausted and cannot call "reset the number of API calls."
2, each account uses "reset the number of API calls" and this interface a total of 10 times a month to clear the operation of the opportunity to clear the effect of once used up a chance;
- Due to differences in the methodology or statistical time of calculation of indicators, real-time call data may have an error, generally within 1%.
4, the interface only supports POST calls
- If you want to clear getComponentAccessToken The number of calls or to clear Official Account or Weixin Mini Program calls on behalf of the merchant as a service provider, you need to use clearComponentQuotaByAppSecret interface.
# 5. Code examples
Example Requests
POST https://api.weixin.qq.com/cgi-bin/clear_quota/v2?appid=wx888888888888&appsecret=xxxxxxxxxxxxxxxxxxxxxxxx
Return an example
{
"errcode": 0,
"errmsg": "ok"
}
# 6. Error code
The following is a list of error codes for this interface, other error codes can refer to General error codes
Error code | Error Description | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
40013 | invalid appid | Invalid AppID, please check the correctness of the AppID, avoid abnormal characters, pay attention to the case |
41002 | appid missing | Missing AppID parameter |
41004 | appsecret missing | Missing secret parameter |
48006 | forbid to clear quota because of reaching the limit | The api disables the number of zeroing calls because the number of zeroing calls is capped |
# 7. Scope of application
Weixin Mini Program | Official Account | Service Account | MiniGame | Weixin Store | Alliance Shipping Agency | Delivery Assistant | Mobile App | Website App | Weixin Channels Assistant | Multi-platform App |
---|---|---|---|---|---|---|---|---|---|---|
✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
- ✔: The account can call this interface
- Other account types that are not expressly stated may not be called on this interface without special instructions;