JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("page", page);
jsonObject1.put("page_size", page_size);
jsonObject1.put("start_date", start_date);
jsonObject1.put("end_date", end_date);
String component_access_token = componentAccessToken.getComponent_access_token();
String url = "https://api.weixin.qq.com/wxa/operationams?action=get_agency_settled_revenue&access_token=" + component_access_token;
HttpResponse resp = HttpRequest.post(url).body(jsonObject1.toString()).execute();
官方文档地址:https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/ams/settlement/GetAgencySettlement.html
感觉没啥问题,为啥报错了,四个参数风别是1,50,"2023-9-24","2023-10-24"
component_access_token :令牌是第三方平台appid和第三方Secret,还有票据然后请求微信获取的令牌
求解/(ㄒoㄒ)/~~
你好,请使用https://api.weixin.qq.com/wxa/getdefaultamsinfo?action=get_agency_settled_revenue&access_token=,重试下接口