如何解决在官方Demo里云调用-服务端调用-发送订阅消息-调用失败的问题?

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:22 1652 0 全屏看文

AI助手支持GPT4.0

如何解决在官方Demo里云调用-服务端调用-发送订阅消息-调用失败的问题?

[云函数] [openapi] subscribeMessage.send 调用失败: Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID , cloud function service error code -504002, error message Error: errCode: 40003  | errMsg: openapi.subscribeMessage.send:fail invalid openid hint: [yhOdtGwgE-hEuK4a] rid: 5f227b73-4264cd8f-4ab9b4d1

appid wxda8f6c98cdc2a66e

完整的请求

 const sendResult = await cloud.openapi.subscribeMessage.send({

    touser: "OPENID",

    template_Id: "templateId",

    miniprogram_state: 'developer',

    page: 'pages/openapi/openapi',

    

    // 此处字段应修改为所申请模板所要求的字段

    data: {

      name6:{

        value: '红红',

      },

      thing1: {

        value: '每日7:00准时晨读',

      },

      time2: {

        value: '06:00:00~08:30:00',

      },

      thing5: {

        value: '让晨读来开启自己元气满满的一天',

      },

      character_string3: {

        value: '0/21',

      },

    }

  })


最近一次操作时间

2020-07-30 15:58

[cloud function] [OpenAPI] subscribeMessage.send Call failed: error: errCode: - 404011 cloud function execution error | errmsg: cloud.callFunction :fail requestID , cloud function service error code -504002, error message Error: errCode: 40003 | errMsg: openapi.subscribeMessage.send : fail invalid open hint: [yhodtgwge-heuk4a] rid: 5f227b73-4264cd8f-4ab9b4d1 appid wxda8f6c98cdc2a66e complete request const sendresult = await cloud.openapi.subscribeMessage .send({ touser: "OPENID", template_ Id: "templateId", miniprogram_ State: 'developer', page: 'pages / OpenAPI / OpenAPI' / / the fields here should be modified to the fields required by the applied template data: {name6: {value: 'red red',}, thing1: {value: 'read on time at 7:00 every day',}, time2: {value: '06:00:00 ~ 08:30:00',}, thing5: {value: 'let morning reading open your full day',}, character_ String3: {value: '0 / 21',},}}) the last operation time was 15:58 on July 30, 2020

回答:

云开发技术运营专员-Zira:

调用的参数有错误,请检查

-EOF-

AI助手支持GPT4.0