云函数没有权限调用subscribeMessage接口怎么办
// 发送订阅消息
await cloud.openapi.subscribeMessage.send({
touser: user._openid,
templateId:'模版ID',
page: 'pages/index/index', // 点击卡片后跳转的页面
data: {
date: { value: prediction.nextStart },
thing: { value: '记得准备好用品,注意休息哦~' }
}
});
} catch (err) {
console.error('发送失败', err, user._openid);
}
CloudSDKError: errCode: -604101 function has no permission to call this API | errMsg: system error: error code: -604101
