i am trying to send FCM push notification to my android app on from postman i have on my developer console two api keys when i try to use the first one i get this response from FCM :
Unauthorized
Error 401
and when i try the second one i get this response from FCM :
Error=MissingRegistration

and i have this data in the body :
{ "data":{
"score":"5x1",
"time":"15:10"
}
,
"to":"*******"
}
the token is working fine and i have test it in the firebase console what the problem could be and what is the solution
Error 401 Unauthorized comes beacuse of wrong server key.
To solve this error:
Go to your project settings in firebase console.
Click on Cloud Messaging and copy Server Key mentioned in that page.
Let me know, if more help is required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With