1

Here is the code that I have used and messages are sucessfully being sent to my device. But i wanted to check the delivery status of a message.

How could i do that?
Couldn't find anything in the documentation.

Also, sending a notification from the firebase console shows the delivery status, any way to accesss that?

import firebase_admin
from firebase_admin import messaging

# import firebase_admin
from firebase_admin import credentials

cred = credentials.Certificate("###.json")
firebase_admin.initialize_app(cred)
registration_token = '###'

message = messaging.Message(
    data={
        'disaster': 'earthquake',
        'time': '2:45',
    },
    token=registration_token,
)
response = messaging.send(message)
stovfl
  • 14,998
  • 7
  • 24
  • 51
Shobhit Kumar
  • 626
  • 1
  • 5
  • 21
  • May I see the output of `print(response)` or `print(response.val())`. – stovfl Oct 18 '18 at 11:15
  • One more possible thing to do is to implement [Delivery Receipts](https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref#ccs) – AL. Oct 18 '18 at 16:53

0 Answers0