Search code examples
node.jsfirebasepush-notificationfirebase-cloud-messagingfirebase-notifications

Set user_property to send notification with FCM


I’m using Firebase Cloud Messaging, for PushNotification service. In Firebase console, I can send a notification to a specific user_property.

FireBase Push Notification Console

But I want to send it from the webserver, How can I set user_property in my request?


Solution

  • This option is currently only available when sending a message through the Firebase Notifications Console.

    Only workaround I could think of in order to do this from your own server is if you track a similar property for each user and query the tokens for the corresponding ones and send the message to them accordingly.