Apple Push Notification Service (APNS)
Learn how to use the Apple Push Notification Service (APNS) provider to send push notifications using Novu
Apple Push Notification Service, as the name suggests, is a notification delivery service provided by Apple.
Apple provides two authentication methods to make a secure connection to APNs. The first is Certificate-Based Authentication (using a .p12 certificate). The second is Token-Based Authentication (using a .p8 key). We’ll make use of the .p8 key.
To enable APNS integration, you need to create an Apple Developer account with an Admin role.
To generate the p8 key for your account:
- Head over to Certificates, Identifiers & Profiles > Keys.
- Register a new key and give it a name.
- Enable the Apple Push Notifications service (APNs) checkbox by selecting it.
- Click the Continue button and on the next page, select Register.
- Download the .p8 key file.
You also need the following to connect to APNs:
- Key ID - This is a 10-character unique identifier for the authentication key. You can find it in the key details section of the newly created key in your Apple developer account.
- Team ID - This is available in your Apple developer account.
- Bundle ID - This is the ID of your app. You can find it in the app info section of your Apple developer account.
The overrides field supports all Notification payload values, as shown below:
Before triggering the notification to a subscriber(user) with push as a step in the workflow, make sure you have added the subscriber’s device token as follows:
Checkout the API reference for more details.