问题
Push notification FMC API doesn't work on iOS
I tried to verify my APNS certificates and seems okay
From FMC console testing notifications work and arrive successfully to iOS devices
Endpoint url https://fcm.googleapis.com/fcm/send
Request headers:
Content-Type:application/json
Authorization:key=**SERVER_KEY**
Request payload body:
{
"to": "**FMC_DEVICE_TOKEN**",
"priority": "high",
"notification": {
"title": "Title",
"body" : "First Notification",
"text": "Text"
}
}
Response body:
{
"multicast_id": 6714208302733418144,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{
"error": "InvalidApnsCredential"
}
]
}
回答1:
This is apparently a global issue from Firebase today. Many people have been reporting this error in the past 3 hours. I hope it's gonna be fixed tomorrow.
来源:https://stackoverflow.com/questions/57310186/push-notifications-work-from-fcm-console-but-if-sent-from-api-show-invalidapnsc