SendNormalizedPushNotificationBatch
Sends a notification to a list of users consisting of alert content and custom data.
Service | Operation |
---|---|
pushNotification | SEND_NORMALIZED_BATCH |
Method Parameters
Parameter | Description |
---|---|
profileIds | Target list of users. |
alertContent | Body and title of alert. |
customData | Optional custom data. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var profileIds = "the-profile-id,another-profile-id";
var alertContent = {
"body": "content of message",
"title": "message title"
};
var customData = {
"field1": "value1",
"field2": "value2"
};
var pushNotificationProxy = bridge.getPushNotificationServiceProxy();
var postResult = pushNotificationProxy.sendNormalizedPushNotificationBatch(profileIds, alertContent, customData);
if (postResult.status == 200) {
// Success!
}
{
"service": "pushNotification",
"operation": "SEND_NORMALIZED_BATCH",
"data": {
"profileIds": [
"the-profile-id",
"another-profile-id"
],
"alertContent": {
"body": "content of message",
"title": "message title"
},
"customData": {
"field1": "value1",
"field2": "value2"
}
}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": null
}
]
}