微信公众号/小程序获取token :
https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=appid&secret=secret
获取微信公众号关注列表的openid:
https://api.weixin.qq.com/cgi-bin/user/get?access_token=access_token
公众号获取用户基本信息:
https://api.weixin.qq.com/cgi-bin/user/info?access_token=access_token&openid=openid&lang=zh_CN
小程序订阅消息:
https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=access_token
请求参数,
{ "touser": "touserId", "template_id": "template_id", "page": "index", "lang":"zh_CN", "data": { "thing1": { "value": "恒大" }, "thing2": { "value": "上海市浦东" }, "date3": { "value": "2020年8月30日" } , "thing4": { "value": "快速购买" } }}公众号模板消息接口 :
https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=access_token
请求参数,
{ "touser": "touserId", "template_id": "templateId", "miniprogram": { "appid": "appid", "pagepath": "pages/index/index?scene=f:s-k:213631-p:QXJN" }, "data": { "first": { "value": "上海 2020年第33周" }, "keyword1": { "value": "商品住宅n成交20,000m²,环比上涨19.9%。89套环比下跌21.9%。成交均价29,999元/m²。n供应20,000m²,环比上涨19.9%。89套环比下跌21.9%。成交均价29,999元/m²。" }, "keyword2": { "value": "2020/01/01-2020/01/07" }, "keyword3": { "value": "招拍挂土地" }, "keyword4": { "value": "成交两幅,无供应" }, "remark": { "value": "进入小程序,查看详细数据或者设置订阅方式" } }}参考官方:开放接口 | 微信开放文档