内容安全接口 data format error ?
发布于 7 年前 作者 leifang 4434 次浏览 来自 官方Issues

Post请求代码:

String url=String.format("https://api.weixin.qq.com/wxa/msg_sec_check?access_token=%s", access_token);
try {
URIBuilder builder = new URIBuilder(url);
URI uri = builder.build();
HttpPost httpPost = new HttpPost(uri);
StringEntity s = new StringEntity(content, "utf-8");
s.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
httpPost.setEntity(s);
httpPost.setHeader("Content-type", "application/json");
response = httpclient.execute(httpPost);
if (response.getStatusLine().getStatusCode() == 200) {
resultString = EntityUtils.toString(response.getEntity(), "UTF-8");
}
} catch (Exception e) {
e.printStackTrace();
}

后台请求后获取到如下JSON:{“errcode”:47001,“errmsg”:“data format error hint: [T8SpSa04594711]”}

47001错误码没有在文档里找到请大佬们指条路

回到顶部