SendRawPushNotificationBatch
Sends a notification to a list of users consisting of raw message content.
Service | Operation |
---|---|
pushNotification | SEND_RAW_BATCH |
Method Parameters
Parameter | Description |
---|---|
profileIds | Target list of users. |
fcmContent | FCM dependent message content. |
iosContent | IOS dependent message content. |
facebookContent | Facebook dependent message content. |
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 fcmContent = {
"notification": {
"body": "content of message",
"title": "message title"
},
"data": {
"customfield1": "customValue1",
"customfield2": "customValue2"
},
"priority": "normal"
};
var iosContent = {
"aps": {
"alert": {
"body": "content of message",
"title": "message title"
},
"badge": 0,
"sound": "gggg"
}
};
var facebookContent = {
"template": "content of message"
};
var pushNotificationProxy = bridge.getPushNotificationServiceProxy();
var postResult = pushNotificationProxy.sendRawPushNotificationBatch(profileIds, fcmContent, iosContent, facebookContent);
if (postResult.status == 200) {
// Success!
}
{
"service": "pushNotification",
"operation": "SEND_RAW_BATCH",
"data": {
"profileIds": [
"the-profile-id",
"another-profile-id"
],
"fcmContent": {
"notification": {
"body": "content of message",
"title": "message title"
},
"data": {
"customfield1": "customValue1",
"customfield2": "customValue2"
},
"priority": "normal"
},
"iosContent": {
"aps": {
"alert": {
"body": "content of message",
"title": "message title"
},
"badge": 0,
"sound": "gggg"
}
},
"facebookContent": {
"template": "content of message"
}
}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": null
}
]
}