Skip to main content
Version: 5.7.0

SendRawPushNotificationBatch

Sends a notification to a list of users consisting of raw message content.

ServiceOperation
pushNotificationSEND_RAW_BATCH

Method Parameters

ParameterDescription
profileIdsTarget user list
alertContentJsonBody and title of alert
customDataJsonOptional custom data

Usage

http://localhost:3000
string[] profileIds = { "a-profile-id", "another-profile-id" };
string fcmContent = "{\"notification\":{\"body\":\"content of message\",\"title\":\"message title\"},\"data\":{\"customfield1\":\"customValue1\",\"customfield2\":\"customValue2\"},\"priority\":\"normal\"}";
string iosContent = "{\"aps\":{\"alert\":{\"body\":\"content of message\",\"title\":\"message title\"},\"badge\":0,\"sound\":\"gggg\"}}";
string facebookContent = "{\"template\":\"content of message\"}";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.PushNotificationService.SendRawPushNotificationBatch(profileIds, fcmContent, iosContent, facebookContent, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": null
}