---
source_url: https://www.pubnub.com/docs/sdks/rest-api/mobile-push-notifications-introduction
title: Mobile Push Notifications introduction
---

# Mobile Push Notifications introduction

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Authorize and revoke push tokens for the Apple and Google push notification services.

**NOTE: PubNub's Mobile Push Notifications feature now support APNs HTTP/2 and this support involves different API calls and different publish payloads.**

The `type` parameter indicates the backend which PubNub will utilize:

`apns` - Apple Push Notification service

`fcm` - Firebase Cloud Messaging push notification service

### Publishing

Given a channel `myChannel`, and subscribed mobile clients, a server SDK must execute a public command by sending the following JSON payload to `myChannel`

* [Apple push notification service](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html)

APNs HTTP/2 example:

`{ "pn_apns": { "aps": { "alert": "hello world" }, "pn_push": [ { "targets": [ { "environment": "production", "topic": "BUNDLE_ID_FOR_APP_1" } ], "version": "v2" } ] } }`

Non-APNs HTTP/2 example:

`{ "pn_apns": { "aps": { "alert": "hi", "badge": 2, "sound": "melody" }, "pn_other": { "additional": "fields" } } }`

* [Google push notification service](https://developers.google.com/cloud-messaging/#params)

`{ "pn_fcm": { }, "pn_other": { "additional": "fields" } }`

Please refer to the [tutorial](https://www.pubnub.com/docs/integrations/mobile-push-notifications/overview.md) for additional examples.
