分类:
微信小程序
获取access_token
public static string GetToken() { HttpClient httpClient = new HttpClient(); //获取 string rester=httpClient.GetAsync("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET").Result.Content.ReadAsStringAsync().Result; return rester; }
rester
再到微信公众平台去设置使用网页调试工具调试该接口点击进去
sercret 开发者密码(这里可以重新设置)
接下来点击检查问题。注新用户要注意要把你自己买的服务器的ip地址填入(IP白名单中)
不然早不到如上图的IP地址
评价