Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send Firebase Cloud Messaging notification to users by user property

I'm trying to send out an FCM message to a specific set of users (or really, a single user) based on a specific user property but looking through the FCM HTTP API I can't seem to find a way to do that. I can send to users via topics, registration tokens, and device group notification keys, but I don't have any of that infrastructure set up in the near term. I know this functionality exists as you can send such a message via the UI, but I'm not seeing how to do it in the API documentation as yet.

like image 719
moberemk Avatar asked Feb 17 '26 02:02

moberemk


1 Answers

There is currently no parameter that you could use to specify a user property (or even for user segments) that will serve as a target for the FCM API to send the message to.

As you've already searched, the only targets possible are single/multiple registration tokens (to and registration_ids), topics, conditions, and device groups (notification_key).

The option you're looking for is currently only available when using the Notifications Console.

like image 196
AL. Avatar answered Feb 18 '26 16:02

AL.