因為公司需要透過Firebase api 來傳送通知訊息,所以簡易的用了Postman call api 測試
[POST]https://fcm.googleapis.com/fcm/sendHeaders:Content-Type:application/jsonAuthorization:key=FCM_SERVER_ACCESS_KEY
FCM_SERVER_ACCESS_KEY可以從Firebase console的專案設定裡找到
Request:{
"to": FCM接收端的token,
"notification":{"title": "title",
"body": "body"}
}Response:{
"multicast_id": 7547885779550062727,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{
"message_id": "0:1557812640012369%f62a7ac8f62a7ac8"
}
]
}