3

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.

moberemk
  • 1,597
  • 1
  • 18
  • 39

1 Answers1

3

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.

AL.
  • 36,815
  • 10
  • 142
  • 281
  • Too bad, was hoping that I was just missing something...thanks for confirming though. – moberemk Jun 15 '17 at 14:59
  • Have you please an idea about if multiple userProperty values (of the same userProperty key) can be associated to the same user (device)? – Ne AS Dec 11 '18 at 11:31
  • @NeAS I think you're expecting too much from FCM. With that use-case, you'd have to implement a profile system on your own and tie the token to it. – AL. Dec 11 '18 at 15:17
  • @AL. thanks for the answer. So the conclusion is that a device can be linked to one value of a specific user property. Isn't it? – Ne AS Dec 11 '18 at 17:32