Firebase Cloud Messaging HTTP Protocol
https://firebase.google.com/docs/cloud-messaging/http-server-ref
PowershellでFCM Push通知送信
$SERVER_KEY='abc...'
$DEVICE_TOKEN='123...'
$JSONBODY=@"
{
"to": "${DEVICE_TOKEN}",
"data": {
"url": "https://yahoo.jp"
},
"notification": {
"title": "a title",
"body": "a test message"
},
"priority":10,
"mutable_content":true
}
"@
$AuthHeader=@{'Authorization'="key=${SERVER_KEY}"}
$Url= 'https://fcm.googleapis.com/fcm/send'
$Response=Invoke-RestMethod -Verbose -Method Post -Uri $Url -Headers $AuthHeader -ContentType "application/json" -Body $JSONBODY
$Response