瑾冰

获取微信token的小问题

电脑版发表于:2019/12/12 17:06

获取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地址




关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢