是微信的公众号才会有open_id assert_token这些词汇概念。
当我扫一般的二维码是不会带有这些东西。
(1) 关于access_token
获取 access_token:先要知道自己的公众号的appid和appserect
如:appid:xxx appSerect:xxxxxx
然后在浏览器输入以下地址:
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=xxx&secret=xxxxx (注意你的ip要在白名单)
最后会返回json:
{
"access_token":"xxxxxxxxxxx",
"expires_in":"xxx"
}
*acess_token随着时间会被更改
(2) 关于openid
获得关注者扫描后,产生的openId。 openId是用来识别用户的。具体唯一性。
获取openid后,是否可以查询到关注者得一些信息。(ip,地址,省份,城市等)
获取openid的方式:
https://mp.weixin.qq.com/debug