what is Device Registration ID for firebase fcm and where I can extract them?

from pyfcm import FCMNotification

push_service = FCMNotification(api_key="<api-key>")

registration_id = "<device registration_id>"
message_title = "Uber update"
message_body = "Hi john, your customized news for today is ready"
result = push_service.notify_single_device(registration_id=registration_id, message_title=message_title, message_body=message_body)

print result


I am working on Pyfcm for push notification, for which i want to get the device registration id.

Answers

You can get token(=device registration_id)

In my code:

String newToken= instanceIdResult.getToken();

Maybe in your code:

String newToken = FirebaseInstanceId.getInstance().getToken();

so newToken = device registration_id

Posted on by wonwoo choi