Set up push notification credentials (iOS APNs and Android FCM)

Before MAM Suite can send a single push notification, it needs to be able to talk to Apple and Google on your behalf — that’s what these credentials are for. iOS pushes travel through Apple Push Notification service (APNs); Android pushes travel through Firebase Cloud Messaging (FCM v1). This guide walks you through gathering both sets of credentials and entering them in the MAM admin.

You’ll only do this once per app. Until both sides are set up, a test send will fail with a credential error and nothing will reach a device.


Goal

Enter your Apple APNs key and your Firebase service-account JSON in the MAM admin so the push dispatcher can send notifications to iOS and Android devices.


Prerequisites

  • mam-main installed and activated.
  • Admin access to Mobile App Manager in WordPress.
  • An Apple Developer Program membership (for the APNs key).
  • A Firebase project for your app (for the FCM service account).
  • Your iOS bundle ID and Android package name decided. If you have not finished publishing setup yet, see Run the App Publishing Wizard end to end.

If you have not yet created your developer accounts, do that first: see Create your Apple Developer account and invite the MAM team and Create your Google Play Developer account and invite the MAM team.


Steps

1. Issue an APNs key in Apple Developer

In the Apple Developer portal, go to Certificates, Identifiers & Profiles → Keys and create a new key with Apple Push Notifications service (APNs) enabled.

Apple hands you three things you’ll need:

  • A key file (download it immediately — Apple will not let you download it a second time).
  • A Key ID (10 characters).
  • Your Team ID (10 characters, shown in your Apple Developer account membership details).

Keep the key file somewhere safe — you’ll upload it in step 4.

2. Generate a Firebase service-account JSON

In the Firebase Console, open your project and go to Project Settings → Service accounts → Generate new private key. Firebase downloads a JSON file with the service-account credentials in it.

While you’re there, note your Firebase Project ID (shown on the General tab of Project Settings) — MAM needs it to build the FCM v1 send endpoint.

A quick heads-up on terminology: the Android sender uses the FCM v1 API (OAuth2 service account), not the deprecated legacy server-key API. A legacy server key won’t work here — you need the service-account JSON.

3. Open the push notification settings page

In WordPress, go to Mobile App Manager → App Settings, then open the Keys and Push Notification Settings page. It is organized into sections for iOS Keys and Settings and Android Keys and Settings.

4. Fill in the iOS (APNs) fields

In the iOS Keys and Settings section, complete:

  • iTunes Bundle ID — your app’s bundle identifier. This must match the bundle ID you register with App Store Connect.
  • iTunes Team ID — the 10-character Team ID from step 1.
  • iTunes Push Notification Certificate ID — the Key ID from step 1.
  • iTunes Push Notification Certificate (PEM) — upload the APNs key file you downloaded from Apple.

Don’t let the field names throw you. They still say “iTunes” and “Certificate (PEM),” but MAM’s iOS sender actually uses token-based APNs authentication — the Key ID, Team ID, bundle ID, and key file working together — not a legacy .p12 push certificate. Just upload the .p8 APNs auth key you downloaded from Apple; it’s already in PEM format, so there’s no conversion to do.

5. Fill in the Android (FCM) fields

In the Android Keys and Settings section, complete:

  • Firebase Project ID for Push Notifications — the Project ID you noted in step 2.
  • Firebase Project Server JSON — upload the service-account JSON file you generated in step 2.

Optionally, set an Android Notification Icon (square) (a square image used as the small icon Android shows in the notification tray).

6. Save

Click the Save button at the bottom of the page. Your credentials are stored with your app’s settings, ready for the push dispatcher to read them at send time.

7. Run a test send

The fastest way to confirm everything is wired up is to send yourself a push.

  1. Install the WPMAM Previewer app and sign in as yourself, or open your built app on a real device, so a device token is registered.
  2. Trigger a notification on the push channel to your own user (for example via Mobile App Manager → Notifications, depending on your build).
  3. Confirm the notification arrives on the device.

When it works, the notification lands on your device within a few seconds. If it doesn’t, you’ll get a structured error rather than a generic crash — for example, a BadDeviceToken (APNs) or UNREGISTERED / NOT_FOUND (FCM) result just means the stored device token is stale, and the device will re-register the next time it launches. It does not mean your credentials are wrong.


How MAM uses what you entered

You provided iOS / Android Used for
Bundle ID iOS The APNs topic and token auth identity.
Team ID + Key ID + key file iOS Token-based APNs authentication (signed provider token).
Firebase Project ID Android Builds the FCM v1 send endpoint for your project.
Service-account JSON Android Signs the OAuth2 access token MAM sends to FCM v1.

On iOS, MAM tries the production APNs environment first, then automatically retries sandbox if production rejects the token — so the same credentials cover both your App Store builds and your development/Previewer builds without any extra setup.

You won’t ever enter a device token yourself. The app registers each device’s push token the first time it launches; MAM stores it per user and looks it up when it’s time to send.


Troubleshooting

  • Test send fails with a credential error. One side is missing or wrong. Double-check that the iOS key file uploaded successfully, that the Team ID and Key ID match exactly (no extra spaces), and that the Firebase Project ID matches the project the JSON came from.
  • BadDeviceToken / UNREGISTERED. This is just normal token churn — the device was reinstalled, restored from a backup, or hasn’t opened the app since it last registered. It’ll re-register on its own the next time it launches.
  • FCM rejects with an auth error. Confirm you uploaded a service-account JSON (from Service accounts → Generate new private key), not a google-services.json config file, and that the project has Cloud Messaging enabled.
  • Nothing arrives, no error. Confirm the device actually granted push permission first. See Add an ‘Enable Push Notifications’ button for the in-app opt-in.

Security note: these push credentials live in your WordPress site’s settings, so treat admin access to this page as sensitive — especially on sites where several people share WordPress admin access.


  • Add an ‘Enable Push Notifications’ button — the in-app control that prompts users to allow notifications.
  • Create your Apple Developer account and invite the MAM team
  • Create your Google Play Developer account and invite the MAM team
  • Run the App Publishing Wizard end to end

What’s next

With credentials in place and a test send behind you, you’re ready to start sending real notifications to your users. Add the opt-in button so people can enable push, then wire notifications to the events that matter for your app — orders, new content, offers, whatever fits.

Was this article helpful?
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!