gcm的curl, 需要修改$access_token
和 $device_token
curl -X POST -H "Authorization: Bearer $access_token" -H "Content-Type: application/json" -d '{
"message":{
"notification": {
"title": "FCM Message",
"body": "This is an FCM Message",
},
"token": "$device_token"
}
}' "https://fcm.googleapis.com/v1/projects/myproject-b5ae1/messages:send"
fcm的curl, 需要修改$access_token
和 $device_token
curl -XPOST -H "Authorization: key=$access_token" -H "Content-Type: application/json" -d '{
"priority": "high",
"data": {
"message": "data Message from wangxf"
},
"to": "$device_token"
}' https://fcm.googleapis.com/fcm/send