【问题标题】:FCM error results - refer error to tokenFCM 错误结果 - 将错误提交给令牌
【发布时间】:2017-12-21 19:44:47
【问题描述】:

通过fcm(通过nodejs firebase admin sdk)发送推送消息时,得到这个错误结构:

{
  "results": [
    {
      "error": {
        "code": "messaging/invalid-registration-token",
        "message": "Invalid registration token provided. Make sure it matches the registration token the client app receives from registering with FCM."
      }
    }
  ],
  "canonicalRegistrationTokenCount": 0,
  "failureCount": 1,
  "successCount": 0,
  "multicastId": SOME_ID
}

结果的索引是否与发送到 firebase 的令牌数组的索引有关?

【问题讨论】:

    标签: node.js firebase push-notification firebase-cloud-messaging


    【解决方案1】:

    是的,如here所述:

    results 表示已处理消息状态的对象数组。对象按与请求相同的顺序列出(即,对于请求中的每个注册 ID,其结果都列在响应中的相同索引中)。

    【讨论】:

      猜你喜欢
      • 2021-09-17
      • 2017-02-03
      • 1970-01-01
      • 2014-09-16
      • 1970-01-01
      • 2018-09-07
      • 1970-01-01
      • 2021-01-23
      • 2016-08-04
      相关资源
      最近更新 更多