Thursday, 18 April 2019

"error": "InvalidRegistration" while sending notifications from postman

I am implementing FCM Push Notifications in Xamarin.Forms. In iOS project, inside RegisteredForRemoteNotifications method deviceToken getting generated in strange format which is not supporting for sending notifications.

Please look at below screenshot:

enter image description here

Code of above image

public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{
    FirebasePushNotificationManager.DidRegisterRemoteNotifications(deviceToken);
    Console.WriteLine("This is token: "+deviceToken);
}

When I am using this token for sending notifications from Postman getting error

{ "multicast_id": 8631208504861228784, "success": 0, "failure": 1, "canonical_ids": 0, "results": [ { "error": "InvalidRegistration" } ] }

I have tried this token in various combinations like

{<7e28c7a6 f1a28967 68a8f599 0786f8d6 8ed04444 89121650 3e47da42 f651dee0>}
<7e28c7a6 f1a28967 68a8f599 0786f8d6 8ed04444 89121650 3e47da42 f651dee0>
7e28c7a6 f1a28967 68a8f599 0786f8d6 8ed04444 89121650 3e47da42 f651dee0
7e28c7a6f1a2896768a8f5990786f8d68ed04444891216503e47da42f651dee0

When I expand deviceToken it shows this information

enter image description here

always getting same error. Is this the token or something else, I have doubt. How can I solve this issue?



from "error": "InvalidRegistration" while sending notifications from postman

No comments:

Post a Comment