- 调用统一消息发送服务报48001,该如何处理?
获取access_token使用的服务号里的appid和appsecret,能获取到 但调用POST https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN 接口发送消息时报错:{"errcode":48001,"errmsg":"api unauthorized hints: [uiBd3cqge-LIVAOA!]"} 发送的消息: {"touser":"用户的openid", "mp_template_msg": {"appid":"服务号的appid", "template_id":"模板消息id", "url":"", "miniprogram": {"appid":"小程序的appid","pagepath":"pages/home/main"}, "data":{"first":{"value":"恭喜你购买成功","color":"#3E96D6"},"keyword1":{"value":"审核通过1","color":"#3E96D6"},"keyword2":{"value":"审核通过2","color":"#3E96D6"},"keyword3":{"value":"审核通过3","color":"#3E96D6"},"keyword4":{"value":"审核通过4","color":"#3E96D6"},"remark":{"value":"审核通过4","color":"#3E96D6"}}}}
2020-07-04 - 扫小程序码 无法传递scene参数
微信开发工具v1.02.1902010 -> 通过二维码编译 -> 选择生成的小程序码图片 扫描后没有在index.js的onLoad函数里获取到scene 生成小程序码的代码: access_token_parms = {'grant_type':'client_credential','appid':settings.WXSM_APPID,'secret':settings.WXSM_SRECRET} access_token_rtn = requests.get('https://api.weixin.qq.com/cgi-bin/token',params=access_token_parms) access_token = access_token_rtn.json()['access_token'] wxacode_rtn = requests.post('https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token='+access_token,json={'scene':'2'}) return HttpResponse(wxacode_rtn.content, content_type="image/png") 开发者工具调试的结果:
2019-03-16