【发布时间】:2020-03-30 12:22:07
【问题描述】:
我正在尝试通过 Firebase 发送 VoIP 推送通知。我在 Firebase 控制台中将 *.p8 文件上传到我的项目,现在那里显示了 APNs Auth Key。
我的警报推送通知发送没有任何问题:
'apns' => [
'headers' => [
'apns-push-type' => ‘alarm',
],
...
但是当我尝试将类型更改为voip 时,我得到一个错误:
'apns' => [
'headers' => [
'apns-push-type' => 'voip',
'apns-topic' => ‘com.mycompany.myapp.voip'
],
...
Firebase 响应:
#errors: array:1 [
"error" => array:4 [
"code" => 400
"message" => "Request contains an invalid argument."
"status" => "INVALID_ARGUMENT"
"details" => array:2 [
0 => array:2 [
"@type" => "type.googleapis.com/google.firebase.fcm.v1.FcmError"
"errorCode" => "INVALID_ARGUMENT"
]
1 => array:2 [
"@type" => "type.googleapis.com/google.rpc.BadRequest"
"fieldViolations" => array:1 [
0 => array:2 [
"field" => "message.token"
"description" => "Invalid registration token"
]
]
]
]
]
]
有什么想法吗?我错过了什么重要的东西吗?
【问题讨论】:
标签: firebase apple-push-notifications voip