Firebase notification records/log API

2019-01-01 09:30发布

I'm sending messages to several iOS Apps via FCM by using their HTTP protocol API,

and I need a list of message records including the payload, sent time, and platform like what I could monitor in the Firebase Notification Console.

It seems that messages sent via HTTP API wouldn't be recorded and shown in the console (only those sent manually in the console would).

I haven't found any API documents related to those messaging events/log fetching.

Is there a way to fetch this kind of message information from FCM?

1条回答
零度萤火
2楼-- · 2019-01-01 10:09

As of August 2018, stats for messages sent using the FCM API are now visible from the console. From the Cloud Messaging section, click on the Reports tab. From there, you will be able to filter by message type (notification, data, and all)

enter image description here

It would seem that the Impressions and Opens are still only available for messages sent using the console. But Sends for sure now counts the messages sent using the FCM API.

Reference: https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html


Update: The FCM Diagnostics page has been disabled since last year.


If you have a Play Dev Console account and if your app is in at least Alpha Testing, you can make use of the Diagnostics and Statistics page. However, if you're looking for an API, there is currently no API available for it.

Otherwise, I think most of the details you need (like the payload and time sent) can be logged from your app server alone.

And just to support what you already mentioned in your post, as stated by @FrankvanPuffelen here:

The Firebase Notifications charts only show analytics for messages that were sent using the Firebase Notifications panel.

There is currently no public API to send Notifications to audiences. The web interface in the console is the only way to send them.

There is currently no API to feed your own FCM messages into the Firebase Notifications analytics panels.

查看更多
登录 后发表回答