接口說明
接口英文名
clearQuotaByAppSecret
功能描述
本接口用于清空公眾號/小程序等接口的每日調用接口次數(shù)
注意事項
1、該接口通過appsecret調用,解決了accesss_token耗盡無法調用重置 API 調用次數(shù)的情況
2、每個賬號每月使用重置 API 調用次數(shù) 與本接口共10次清零操作機會,清零生效一次即用掉一次機會;
3、由于指標計算方法或統(tǒng)計時間差異,實時調用量數(shù)據(jù)可能會出現(xiàn)誤差,一般在1%以內
4、該接口僅支持POST調用
調用方式
HTTPS 調用
POST https://api.weixin.qq.com/cgi-bin/clear_quota/v2
請求參數(shù)
屬性 | 類型 | 必填 | 說明 |
---|---|---|---|
appid | string | 是 | 要被清空的公眾號賬號的appid |
appsecret | string | 是 | 唯一憑證密鑰,即 AppSecret,獲取方式同 appid |
返回參數(shù)
屬性 | 類型 | 說明 |
---|---|---|
errcode | number | 錯誤碼 |
errmsg | string | 錯誤信息 |
調用示例
示例說明: post請求
請求數(shù)據(jù)示例
POST https://api.weixin.qq.com/cgi-bin/clear_quota/v2?appid=wx888888888888&appsecret=xxxxxxxxxxxxxxxxxxxxxxxx
返回數(shù)據(jù)示例
{
"errcode": 0,
"errmsg": "ok"
}
錯誤碼
錯誤碼 | 錯誤碼取值 | 解決方案 |
---|---|---|
-1 | system error | 系統(tǒng)繁忙,此時請開發(fā)者稍候再試 |
40013 | invalid appid | 不合法的 AppID ,請開發(fā)者檢查 AppID 的正確性,避免異常字符,注意大小寫 |
41004 | appsecret missing | 缺少 secret 參數(shù) |
41002 | appid missing | 缺少 appid 參數(shù) |
48006 | forbid to clear quota because of reaching the limit | api 禁止清零調用次數(shù),因為清零次數(shù)達到上限 |