小程序发送模板消息提示form_id 失效或已过期
是用开发版的代码,手机扫码获取到的form_id,这个form_id一定要在线上吗?不能在本地测试还是我这边流程有问题
string url = string .Format( "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token={0}" , AccessToken); string postData = "{\"touser\":\"" + openId + "\",\"template_id\":\"" +zzlsTemplateId+ "\"," + "\"miniprogram\":{\"appid\":\"" + zzlsxcxId + "\",\"page\":\"" + pagepath + "\",\"form_id\":\"" + formId + "\"}," + "\"data\":{\"first\":{\"value\":\"开课提醒\"}," + "\"keyword1\":{\"value\":\"" + liveTitle + "\"}," + "\"keyword2\":{\"value\":\"" + time + "\"}," + "\"keyword3\":{\"value\":\"" + teacherName + "\"}" + "}}" ; |
如果收集的是开发版的form_id,那从模板消息进入就是开发版小程序
form_id7天有效