I am trying to add APNS connection in Azure Notification Hub with Token as authentication mode.
I have searched around but I am not able to find any guides anywhere to make this work.
Maybe someone has a link to a guide showing how to find the information needed?
I tried to create a "APNs Auth Key" in Apple developer console, but that gives me a .p8 file and the token inside that file does not seem to be accepted, so I guess I need to find the token somewhere else.
I hope someone have a link to a guide for setting this up and find the information needed.
Apple Push Notification service (APNs) must know the address of a user's device before it can send notifications to that device. This address takes the form of a device token unique to both the device and your app.
In the Azure portal, on the Notification Hub page, select Windows Phone (MPNS) from the left menu. Enable either unauthenticated or authenticated push notifications: a. To enable unauthenticated push notifications, select Enable unauthenticated push > Save.
Azure Notification Hubs is a massively scalable mobile push notification engine for quickly sending millions of notifications to iOS, Android, Windows, or Kindle devices, working with APNs (Apple Push Notification service), GCM (Google Cloud Messaging), WNS (Windows Push Notification Service), and more.
Update (Apr 2018): @Krumelur reports in the comments that the blog article is out of date. Check out his suggestion on how to fix it to avoid getting errors.
Update (June 2017): There is now an official Microsoft post about Token-based (HTTP/2) Authentication for APNS.
Original answer (May 2017):
Token Based Authentication and HTTP/2 Example with APNS is a good step by step guide of how to get those values from your Apple Developer Account.
Key ID
in Azure Portal is what APNS_KEY_ID
is in the sample aboveApp Name
in Azure Portal is your app nameApp ID
in Azure Portal is what TEAM_ID
is in the sample aboveToken
in Azure Portal is the contents of the file referred to in APNS_AUTH_KEY
variable in the sample aboveDo not forget to keep track which keys and tokens are sandbox and which are production endpoint ones.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With