收藏
回答

获取稳定版accesstoken接口调用平次没有达到上限,却提示:达到最大api日配额限制?

public AccessTokenResp getMiniProgramAccessToken() {
    try {
        AuthorizeAccessTokenReq req = new AuthorizeAccessTokenReq().setAppid(properties.getMiniProgramAppId()).setSecret(properties.getMiniProgramAppSecret());
        log.info("[WechatRemoteService.getMiniProgramAccessToken] req : {}", JSON.toJSONString(req));
        AccessTokenResp accessTokenResp = restTemplate.postForObject(properties.getAuthorizeAccessToken(), req, AccessTokenResp.class);
        log.info("[WechatRemoteService.getMiniProgramAccessToken] resp: {}", JSON.toJSONString(accessTokenResp));
        return accessTokenResp;
    } catch (Exception e) {
        log.error("[WechatRemoteService.getMiniProgramAccessToken] throw exception : {}", e.getMessage(), e);
        return null;
    }
}


回答关注问题邀请回答
收藏

4 个回答

登录 后发表内容