---
schema_version: "1"
id: 6faa8b16f4915503b1862f93a37cc05af8a3aeecf057fecc2e26ee60393c25ce
title: Push Messaging
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud-mobilepush/engagement_sdk/references/react-hybrid/push-messaging.md
canonical_url: https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/push-messaging.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3e6a98403c763c4975bfa290456b73c824a03fb2edc6fc3f3930a80a84149aa0
products:
  - Salesforce Engagement SDK
---
# Push Messaging

This section provides API reference details for the Push Messaging module in the React Native unified plugin.

## enablePush

Enables push messaging in the native Marketing Cloud SDK.

### Syntax

```javascript
PushMessagingSdkModule.enablePush();
```

### Returns

- `void`

### Example

```javascript
import { PushModule } from "@sfmc/react-native-push";
import type { PushApi } from "@sfmc/react-native-push";

const push: PushApi = await PushModule.requestSdk();
push.enablePush();
```

### See Also

- [Android SDK Reference](https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/SFMCSdk/11.0/pushfeaturemodule/com.salesforce.marketingcloud.pushfeature.push/-push-message-manager/enable-push.html)
- [iOS SDK Reference](https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/%3Chttps://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/appledocs/PushFeatureSdk/2.0/Classes/PushFeature.html#/c:@CM@PushFeatureSDK@objc(cs)SFPushFeature(im)setPushEnabledWithPushEnabled:>)

## disablePush

Disables push messaging in the native Marketing Cloud SDK.

### Syntax

```javascript
PushMessagingSdkModule.disablePush();
```

### Returns

- `void`

### Example

```javascript
import { PushModule } from "@sfmc/react-native-push";
import type { PushApi } from "@sfmc/react-native-push";

const push: PushApi = await PushModule.requestSdk();
push.disablePush();
```

### See Also

- [Android SDK Reference](https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/SFMCSdk/11.0/pushfeaturemodule/com.salesforce.marketingcloud.pushfeature.push/-push-message-manager/disable-push.html)
- [iOS SDK Reference](https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/%3Chttps://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/appledocs/PushFeatureSdk/2.0/Classes/PushFeature.html#/c:@CM@PushFeatureSDK@objc(cs)SFPushFeature(im)setPushEnabledWithPushEnabled:>)

## isPushEnabled

Returns the current state of the push-enabled flag in the native Marketing Cloud SDK.

### Syntax

```javascript
PushMessagingSdkModule.isPushEnabled();
```

### Returns

- `Promise<boolean>` - A promise that resolves to whether push messaging is enabled.

### Example

```javascript
import { PushModule } from "@sfmc/react-native-push";
import type { PushApi } from "@sfmc/react-native-push";

const push: PushApi = await PushModule.requestSdk();
const enabled = await push.isPushEnabled();
```

### See Also

- [Android SDK Reference](https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/SFMCSdk/11.0/pushfeaturemodule/com.salesforce.marketingcloud.pushfeature.push/-push-message-manager/is-push-enabled.html)
- [iOS SDK Reference](https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/%3Chttps://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/appledocs/PushFeatureSdk/2.0/Classes/PushFeature.html#/c:@CM@PushFeatureSDK@objc(cs)SFPushFeature(im)isPushEnabled>)

## getPushToken

Returns the token that Marketing Cloud uses to send push messages to the device.

### Syntax

```javascript
PushMessagingSdkModule.getPushToken();
```

### Returns

- `Promise<string \| null>` - A promise that resolves to the push token string, or `null`.

### Example

```javascript
import { PushModule } from "@sfmc/react-native-push";
import type { PushApi } from "@sfmc/react-native-push";

const push: PushApi = await PushModule.requestSdk();
const token = await push.getPushToken();

const sub = PushModule.getEmitter().addListener("sfmc_push_token_refreshed", ({ token }) => {
  console.log("Token refreshed:", token);
});

sub.remove();
```

### See Also

- [Android SDK Reference](https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/javadocs/SFMCSdk/11.0/pushfeaturemodule/com.salesforce.marketingcloud.pushfeature.push/-push-message-manager/get-push-token.html)
- [iOS SDK Reference](https://developer.salesforce.com/docs/marketing/mobile-unified-sdk/references/engagement-mobile-sdk-reference/%3Chttps://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/appledocs/PushFeatureSdk/2.0/Classes/PushFeature.html#/c:@CM@PushFeatureSDK@objc(cs)SFPushFeature(im)deviceToken>)
