Yonatan
Yonatan

Reputation: 1377

FCM error results - refer error to token

when sending push messages through fcm (through nodejs firebase admin sdk), getting this error structure:

{
  "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
}

Is the index of the results relates to the index of the token array that was sent to firebase?

Upvotes: 3

Views: 1221

Answers (1)

Eran
Eran

Reputation: 393791

Yes, as described here:

results Array of objects representing the status of the messages processed. The objects are listed in the same order as the request (i.e., for each registration ID in the request, its result is listed in the same index in the response).

Upvotes: 3

Related Questions