我用postman从https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token=ACCESS_TOKEN接口获取到的iplist从来没有变化过,就是官方手册举例的ip,跟官方描述的可能会有变动不符,是什么原因呢
{
"ip_list": [
"106.55.206.146",
"106.55.206.211",
"106.55.207.148",
"106.55.207.31",
"118.126.124.186",
"118.126.124.246",
"119.29.180.49",
"119.29.9.101",
"124.223.151.119",
"129.226.105.242",
"162.62.80.57",
"162.62.80.8",
"162.62.81.123",
"175.24.211.142",
"175.24.211.157",
"175.24.211.198",
"175.24.211.31",
"175.24.211.4",
"175.24.212.10",
"175.24.212.185",
"175.24.212.195",
"175.24.213.149",
"175.24.214.150",
"175.24.214.222",
"175.27.64.215",
"175.27.65.216",
"42.192.0.152",
"42.192.0.224",
"42.192.6.57",
"43.132.112.30",
"43.132.141.238",
"43.137.147.169",
"43.143.52.12",
"43.143.59.119",
"81.69.101.193",
"81.69.101.225",
"81.69.101.233",
"81.69.101.237",
"81.69.103.129",
"81.69.103.147",
"81.69.103.163",
"81.69.103.205",
"81.69.103.236",
"81.69.103.238",
"81.69.103.37",
"81.69.103.74",
"81.71.140.59",
"81.71.19.101"
]
}
官方只是说明的可能会变。这个IP是回调发出的IP,和腾讯的网络出口基础设施相关。一般没有问题时不会更换,有问题时才会更换IP出口。建议业务侧更新,也是为了防止IP有变更,同时未加入来源白名单导致被误拦截。如果本身业务侧没有做IP白名单策略,那是可以忽略这个IP列表的。
正常情况下,微信会返回下述JSON数据包给公众号:
代码呢,这一般跟接口没关系,跟你代码有关