Documentation: Push Notifications Onsite Messaging REST API
  1. Documentation
  2. iOS App Push Notification
  3. iOS .p8 Key Token Based APNs Connection

Generate and Configure an iOS .p8 Key for Token-Based APNs Connection

To send push notifications to iOS apps via PushAlert, you need to establish an authenticated connection with Apple Push Notification Service (APNs). The recommended method is using a token-based .p8 key, which is simpler and more secure than the older certificate-based (.p12) method.

This guide walks you through generating your .p8 key and uploading it to your PushAlert account.

Requirements

Before starting, make sure you have:

STEP 1: Generate a .p8 Key in Apple Developer Account

  • Sign in to your Apple Developer Account.
  • Go to Certificates, Identifiers & Profiles Keys.
  • Click the Blue Add (+) button to create a new key.
  • Enter a name (e.g. PushAlert iOS Key).
  • Check Apple Push Notifications service (APNs) and configure to have both Sandbox & Production environment selected.
  • Click Continue, then Register.
  • Download the .p8 key and store it securely, Apple only allows it to be downloaded once.

Note: You can only have two active .p8 keys per Apple Developer account. Revoke an old one if needed before creating a new key.

STEP 2: Get the Required Information

You’ll need the following from your Apple Developer account:

  • .p8 File — the private key you just downloaded
  • Key ID — shown in the Keys section next to your newly created key
  • Team ID — found in the top-right corner of your Apple Developer account

STEP 3: Step 3: Upload the .p8 Key to PushAlert

  • Log in to your PushAlert Dashboard.
  • If you’re adding a new iOS app to the PushAlert dashboard, simply upload the .p8 file generated above and enter your Key ID and Team ID in the respective fields while you're configuring it.

    OR

    If your iOS app is already added, open your iOS App Dashboard, navigate to Settings → App, upload the generated .p8 file, fill in the Key ID and Team ID, and then click Save.

You’ve successfully set up token-based APNs authentication for your iOS app using PushAlert! Your app can now send and receive notifications securely using Apple’s modern authentication system.