@Ditister wrote:
i am trying to call the firebase cloud messages API like this:
fetch('https://fcm.googleapis.com/fcm/send', { method: 'POST', headers: { // 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' 'Content-Type': 'application/json', 'Authorization': 'key=AA##A8RX######Kt-SrCn##eXu' }, body: { "notification":{ "title":"note-Title", "body":"note-Body" }, "to":"??????" } })Console output:
POST https://fcm.googleapis.com/fcm/send 400 ()honestly i have no idea what i have to insert after “to”.
I want to send the push notification to all users.Please help.
Posts: 1
Participants: 1