# Reset the number of API calls

Debugging tools

Interface should be called on the server side, seeHattori API

# Interface Dxplaination

# Interface name

clearQuota

# Functional description

This interface is used to empty Official Account message template/Mini Program/Daily calls to interfaces such as third-party platforms

# Note

1, if you want to empty the quota of the interface of the Official Account message template, you need to use the access of the Official Account message template_TokenIf you want to clear the quota of the Mini Program's interface, you need to use theAccess to Mini programs_TokenIf you want to empty the quota of the interface of the third-party platform, you need to use theComponent of the third-party platform_access_Token

2, if it is a third-party service provider on behalf of the Official Account message template or Mini Program to clear the quota, you need to useauthorizer_access_Token

  1. A total of 10 zeroing opportunities per account per month, and one opportunity is used once the zeroing takes effect.初始值/When the Mini Program is called, it is actually consuming Official Account message template/The Mini Program's own quota

4, due to the difference in index calculation methods or statistical time, real-time call data may have errors, generally within 1%

# Calling mode

# HTTPS call


POST https://api.weixin.qq.com/cgi-bin/clear_quota?access_token=ACCESS_TOKEN 

# Third Party Invocation

  • The calling method and parameters are the same as HTTPS, only the calling token is different

# Request parameters

attribute type Required Introductions
access_Token string yes Interface invokes the certificate, which is URL Parameters, non Body Parameters. useaccess_Tokenorauthorizer_access_Token
appid string yes Appid of the account to be cleared

# Return parameters

attribute type Introductions
errcode number Error code
errmsg string Error message

# Call Example

Example Dxplaination: Sample Request:

# Sample Request Data


{
"appid":"wx448f04719cd48f69"
} 

# Return Data Example


{
  "errcode": 0,
  "errmsg": "ok"
} 

# Error code

Error code Error code Solutions
48006 forbid to clear quota Because of reaching the limit api The number of cleanup calls is prohibited because the maximum number of clearances is reached
0 ok ok
40013 invalid appid Illegal AppID , ask the developer to check AppID The correctness of the, avoid unusual characters, pay attention to the case