发送订阅消息 has no permission to call this function ?
发布于 6 年前 作者 mxia 6452 次浏览 来自 官方Issues

云开发发送订阅消息 function has no permission to call this API

错误信息如下:

代码片段如下:

 try {
    const result = await cloud.openapi.subscribeMessage.send({
      touser: helpItem.open_id,
      page: 'pages/helpInfo/info?help_id=' + helpItem._id,
      data: {
        thing1: {
          value: helpItem.goods_info.goods_name
        },
        thing2: {
          value: '抱歉,你参与的助力活动因过期而失败!'
        }
      },
      templateId: tempids.tmpid_help_fa
    })
    return result
  } catch (err) {
    console.log(err)
    return err
}

  config 文件

{
  "permissions": {
    "openapi":["subscribeMessage.send"]
  }
}

定时函数中调用发送消息方法,大神们,问题出在那儿了呢?

1 回复

单独上传一下 config.json

回到顶部