我想通过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"
]
]
]
]
]
]
有什么想法吗?我有没有错过什么重要的东西吗?