收藏
回答

创建菜单接口报错errcode:40017,errmsg:invalid button type?

AppID
wxc31f72599907d267
public JSONObject createCurrentMenu(MenuDTO menuDTO) {
    Map<String, String> map = new HashMap<>();
    String accessToken = redisCache.getCacheObject(REDIS_WX_OFFICIAL_ACCESS_TOKEN);
    map.put(ACCESS_TOKEN, accessToken);
    String url = genUrl(URL_CREATE_MENU, map);
    String object = JSONObject.toJSONString(menuDTO);
    log.info("object: {}", object);
    JSONObject result = restTemplate.postForObject(url, object, JSONObject.class);
    log.info("创建微信公众号菜单返回结果:{}", result);
    return result;
}
 请求的接口url:"https://api.weixin.qq.com/cgi-bin/menu/create";
回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签