Reputation: 1564
FCM gives two options to send notifications:
So, If I had to send message to 10k users then using registration_ids it will take 10 request to fcm server. But the message is same for every request. I can change message every time in case of to but then i will have to send 10k different requests.
Now, I want to send personalized message.
eg: registration_ids[0]='ggggss' his name is alpha. I would want to send hey alpha,.... similarly for every user.
Is there a way to send personalized notification efficiently?
example syntax: curl -X POST --header "Authorization: key=" \ --Header "Content-Type: application/json" \ https://fcm.googleapis.com/fcm/send \ -d "{\"to\":\"\",\"notification\":{\"body\":\"Yellow\"},\"priority\":10}"
Upvotes: 1
Views: 552
Reputation: 599926
There is no built-in mail merge functionality in Firebase Cloud Message (as far as I know). You will either have to send the same message to multiple users, or perform a separate API call for each user
Upvotes: 1