How do I get the FCM device registration_id

On the backend I’m using PyFCM and it requires the device registration_id.

How do I get that in Capacitor on Android? This tutorial, which works for sending the first test message, does not have the registration_id. I can send the first test message to all users of the app but I cannot yet get it to work with Python on the backend to message this specific app installation.

To be clear, I’m asking for Capacitor support (not Python) needing to send the registration_id from Android to the backend, but this newbie doesn’t know how to obtain that token.


I dont know how does it work, but with the capacitor native plugin i get it this way:

  (id: PushNotificationToken) => {
    this.userRegistrationId = JSON.stringify(id.value);
1 Like