FCM错误结果 – 将错误提交给令牌
当通过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的令牌数组的索引相关?
是的,如下所述:
结果表示处理消息状态的对象数组。 对象以与请求相同的顺序列出(即,对于请求中的每个注册ID,其结果列在响应中的相同索引中)。