扫描普通二维码打开小程序(小程序带参二维码) java+postman

1、首先获取access_token

String requestUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=AppSecret";
String data = HttpUtils.get(requestUrl);
System.out.println(data);
JSONObject json = JSONObject.fromObject(data);
String ACCESS_TOKEN = String.valueOf(json.get("access_token"));
System.out.println(ACCESS_TOKEN);

 

这个时候开始使用postman来获取带参数的二维码

接口:

https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=asdfsadfgadfgasdfgasgsdafgafsgafgadsfgsad

  

 

这里带的参数就在那,post方式请求,收工

 

posted @ 2018-09-05 15:23  anliex  阅读(83)  评论(0)    收藏  举报