VoIP push with new token-based auth?
Asked Answered
B

1

5

I'm able to get the new token-based push working (without using certificates) just fine with normal push notifications and using a simple node.js file for the backend.

But, I can't get it to work with VoIP push. I've tried just using the token derived from PushKit - creditials.token but I always get a 400 error.

I can't seem to find any info on this online. Just the mention from WWDC that token-based auth could also be used for VoIP push.

Blayne answered 28/10, 2016 at 9:4 Comment(2)
Have you given VoIP permissions properly?Rappel
@Rappel yes, I can get VoIP push to work just fine using the old method (certificates). Just can't get it to work with the "Whats new in push! you'll never have to worry about expired certificates again" method.Blayne
R
14

I used the description from http://gobiko.com/blog/token-based-authentication-http2-example-apns/ to send token-based push notifications with python.

It worked well with normal push notifications, but when I tried a voip token instead of my normal push token, I also got a 400 error code. In the error description it said {"reason":"TopicDisallowed"}. Here, I had set my bundle id as apns-topic. I could fix the error by appending .voip to the bundle id.

Note that the voip notifications are silent notifications. Further, if you want to send a complication, according to https://www.foraker.com/blog/pushing-data-to-apple-watch-complications-with-pushkit you should try to append your bundle id with .complication instead.

Rapprochement answered 30/3, 2017 at 21:49 Comment(2)
fix the error by appending .voip to the bundle id as topic. Such as your appId is com.test.test, for voip push, the topic should be com.test.test.voipCzarist
@Rapprochement thanks for the answer. We did not find it on Apple documentation.Pedate

© 2022 - 2024 — McMap. All rights reserved.