收藏
回答

云函数要如何设置调用接口权限?

AppID
wx46658d48a7f4b9ce

 云函数没有权限调用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

回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    03-16
    有用 1
登录 后发表内容