Test mobile push notifications externally

This guide shows you how to send a push notification that bypasses Mobile Push Notifications entirely. That way, you can tell whether a missing push is caused by your APNs or FCM credentials and device token, or by your PubNub-side configuration. A successful external send only rules out your provider credentials and device token. It doesn't confirm your PubNub channel registration or payload shape are correct.

If the push arrives when you bypass PubNub, treat the problem as your PubNub-side configuration, such as channel registration or payload shape. If it doesn't arrive even when you bypass PubNub, treat the problem as your provider credentials or device token, not PubNub.

Test FCM​

Send a push through the FCM HTTP v1 REST API to confirm your Firebase credentials and device token work outside PubNub. Legacy FCM's HTTP API no longer works, since Google removed it in 2024, so use HTTP v1.

  1. Generate an OAuth access token from your Firebase service-account credentials. Follow Firebase's guide on using credentials to mint access tokens.
  2. Send the push directly through the FCM HTTP v1 REST API, using the access token and your device's registration token.

If you don't want to construct the request yourself, use a third-party tool instead. PushTry and the open-source PushNotifications tool can both send a test FCM push for you.

Test APNs​

Send a push directly to Apple to confirm your APNs certificate or auth token and device token work outside PubNub.

  1. Verify your APNs certificate (.pem file) or auth token.
  2. Optionally, target a specific device token to receive the test push.

A community script automates both steps. For a GUI instead of a script, use a Mac App Store APNs test app, an online web-based APNs test tool, or the same third-party tools listed above (PushTry, PushNotifications).

If the test push still fails, check Apple's Troubleshooting Mobile Push Notifications reference for the likely cause.

Was this page useful?

Last updated on