Query API Call Quota

Debug Tool View llm.txt

Last edited on 2026-09-10

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: getApiQuota

This interface is used to query the daily call quota, number of calls, and frequency limits for server-side APIs. Applicable account types: Official Accounts/Service Accounts/ Mini Program /Mini Games/WeChat Stores/Shopping Assistant/Video Account Assistant/Affiliate Marketing Agencies/Mobile Apps/Web Apps/Multi-Platform Apps/Third-Party Platforms, etc.

1. Call Method

HTTPS Call

POST https://api.weixin.qq.com/cgi-bin/openapi/quota/get?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

ParameterTypeRequiredDescription
access_tokenstringYesAPI call credential, you can use access_token, component_access_token, authorizer_access_token

Request Body Request Payload

ParameterTypeRequiredDescription
cgi_pathstringYesThe request URL for the API, such as "/cgi-bin/message/custom/send". Do not include the “https://api.weixin.qq.com” prefix, and ensure the “/” is present; otherwise, error code 76003 will occur.

3. Response Parameters

Response Body Response Payload

ParameterTypeDescription
errcodenumberResponse code
errmsgstringError message
quotaobjectQuota details
rate_limitobjectRegular call frequency limit
component_rate_limitobjectAuthorized call frequency limit

Res.quota Object Payload

Quota details

ParameterTypeDescription
daily_limitnumberNumber of times the account can call this API on the current day
usednumberNumber of times already called on the current day
remainnumberRemaining number of calls available for the day

Res.rate_limit Object Payload

Regular call frequency limit

ParameterTypeDescription
call_countnumberTotal number of calls allowed within a period, in units of times
refresh_secondnumberUpdate interval, in seconds

Res.component_rate_limit Object Payload

Authorized call frequency limit

ParameterTypeDescription
call_countnumberTotal number of calls allowed within a period, in units of times
refresh_secondnumberUpdate interval, in seconds

4. Notes

  1. If the API being queried belongs to an Official Account, the Official Account’s access_token is required; if it belongs to Mini Program, the ** Mini Program ’s** access_token (api_token) is needed; if it belongs to a third-party platform, the third-party platform’s component_access_token is required, and so on.

  2. If the API is from a third-party platform but is used for Official Accounts/ Mini Program, the third-party platform’s authorizer_access_token must be used.

  3. Each API has a limit on the number of calls, so developers should use these APIs responsibly.

  4. Interfaces of the type “/xxx/sns/xxx” do not support this query and will result in error code 76022.

  5. If the API documentation specifies special quota amounts or logic, those details shall take precedence over general rules.

5. Code Example

Request Example

{
  "cgi_path": "/wxa/gettemplatedraftlist"
}

Response Example

{
  "errcode": 0,
  "errmsg": "ok",
  "quota": {
    "daily_limit": 0,
    "used": 0,
    "remain": 0
  }
}

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
0okok
76021cgi_path not found, please checkThe *cgi_path* value is incorrect.
76022could not use this cgi_path,no permissionThe token used in the current API call does not match the account associated with the API. For details, please refer to the notes section.

7. Applicable Scope

API callable status for different account types:
Mini ProgramOfficial AccountService AccountMini GameWeChat ShopAlliance AgencyInfluencerShop SupplierThird-party PlatformMobile AppWebsite AppChannels WindowMulti-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。