- 通过公众平台配置的公众号信息生成 access_token
地址:
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential
&appid=[公众号appID]&secret=[公众号appsecret]
返回值:
{
"access_token":[返回的access_token],
"expires_in":7200
}
2. 获取 ticket
访问地址:
https://mp.weixin.qq.com/debug
body项参数(字符串):
{
"expire_seconds": 604800,
"action_name": "QR_STR_SCENE",
"action_info": {
"scene": {
"scene_str": "test"
}
}
}
3.得到二维码
地址:
https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=[上步获取的ticket]
ok, 流程是这样的.具体的步骤可以根据自己的业务进行修改.