So I have project with push notification, I have app build with Ionic (Client - receive notification) and I have server to push the notification with pyfcm.
In pyfcm, how to get registration_id ? I try dummy the registration_id then the response is :
{'failure': 1, 'canonical_ids': 0, 'success': 0, 'multicast_id': 5299463400095790981L, 'results': [{u'error': u'InvalidRegistration'}]}
I have some tutorial from here https://github.com/olucurious/PyFCM and here https://medium.com/@ankushaggarwal/push-notifications-in-ionic-2-658461108c59 and there is code called :
pushObject.on('registration').subscribe((data: any) => {
console.log("device token ->", data.registrationId);
});
how can I retrieve the registration Id ?
Any help will appreciate..
The
registration_id
being referred to here is referring to a Registration token:Depending on your client (which is Android) it should be generated upon the initial start of your client app. See Setup an Android Client for more details. Also see What is FCM token in Firebase?