ip白名单拦截错误
发布于 4 年前 作者 hanjuan 1675 次浏览 来自 问答
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={}&secret={}

获取访问token是提示内容如下:

invalid ip 47.94.154.7, not in whitelist hint但是我们的域名地址指向ip并不是这个ip。health.jxbrty.com

1 回复
  • 出于安全考虑,api.weixin.qq.com 不能被配置为服务器域名,相关API也不能在小程序内调用。 开发者应将 AppSecret 保存到后台服务器中,通过服务器使用 getAccessToken 接口获取 access_token,并调用相关 API;

https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html

回到顶部