Skip to main content
Version: 1.5.x
Mobile Push

Mobile Push Channel & Providers

Engagespot can deliver native push notifications to your mobile app users.

Supported providers

Currently, Engagespot supports push notifications for the following providers:

  • Firebase
  • Expo

Managing push tokens

To send push notifications, Engagespot needs to know the device token of the user. This token is generated by the push provider and is unique to each device. You can attach the push token to a user's profile in Engagespot depending on the provider.

{
"fcm": {
"tokens": ["fcmToken"]
},
"expo": {
"tokens": ["expoToken"]
}
}

You can also specificy the push token in-line with the notification payload.

engagespot.send({
notification: {
workflow: {
identifier: 'welcomeMessage',
},
},
sendTo: {
recipients: [
{
identifier: 'user@example.com',
expo: {
tokens: ['expoToken'],
},
},
],
},
});

Mobile push channel overrides

By default, Engagespot sends push notifications to the user's mobile device based on how you design the notification template in Workflow builder. You can override the push notification message and title by passing the channel object in the overrides field.

const { EngagespotClient } = require('@engagespot/node');

const client = EngagespotClient({
apiKey: 'YOUR_ENGAGESPOT_API_KEY',
apiSecret: 'YOUR_ENGAGESPOT_API_SECRET',
dataRegion: 'us',
});

client.send({
notification: {
workflow: {
identifier: 'welcomeMessage',
},
},
data: {
key: 'value',
},
sendTo: {
recipients: ['user@example.com'],
},
overrides: {
channel: {
mobilePush: {
title: 'Push notification title',
message: 'Push notification message',
}
}
}
});