调用微信小程序的模板消息发送接口,报错48001,请问该如何处理?
调用微信小程序的模板消息发送接口,报错48001,提示是接口权限问题,小程序上找了个遍,没有找到哪里有给接口权限的地方,还是说是其他地方配置有问题导致的这个接口权限的问题 代码如下: $data['touser'] = $user['openid'];//会员openid $data['template_id'] = "u9cmQAA6A2NhIUfAnlV8qo5MwcZ3lXRu8MNcu4R6KRE";//模板id $data['page'] = "pages/sign/sign"; $data['form_id'] = $act_id; $keydata['keyword1']['value'] = $title; $keydata['keyword2']['value'] = $act_start_time; $keydata['keyword3']['value'] = $address; $keydata['keyword4']['value'] = "尊敬的".$user['user_login'].":您好!\n".$content; $data['data'] = $keydata;//模板内容 $data['emphasis_keyword'] = "keyword1.DATA";//模板内容 $url = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=".$token; $data = json_encode($data); $res = $this->post_wx($url,$data);//curl传参调用接口接口返回报错: array(2) { ["errcode"]=> int(48001) ["errmsg"]=> string(40) "api unauthorized hint: [8TNZUa0138sz25!]" }