My objective is to send messages/notifications from a C# web app to Android/iOS device using Firebase Rest API.
I started using this as a reference: https://firebase.google.com/docs/cloud-messaging/http-server-ref
I went into the console for the Firebase project and went to Settings > Cloud Messaging, where I got the server key.
I have the result of a onTokenRefresh() and so in Postman I try the following:
POST https://fcm.googleapis.com/fcm/send
Content-Type: application/json
Authorization: key=snip
Body:
{
"to":"snip",
"data":{
"Lorem": "ipsum"
}
}
And the response is:
"error": "MismatchSenderId"
Is this because the token I used in the "to" field belongs to a different app/firebase project? Or am I missing another step?