Skip to main content
Version: 5.7.0

SendEventToProfiles

Sends an event to multiple users with the attached json data.

ServiceOperation
eventSEND_EVENT_TO_PROFILES

Method Parameters

ParameterDescription
toIdsThe profile ids of the users to send the event.
eventTypeThe user-defined type of the event.
eventDataThe user-defined data for this event encoded in JSON.

Usage

http://localhost:3000
string toIds = "[\"profileId1\", \"profileId2\"]";
string eventType = "type1";
string eventData = "{\"someMapAttribute\": \"someValue\"}";

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.EventService.SendEventToProfiles(toIds, eventType, eventData, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"errorProfiles": [],
"errorCount": 0,
"sentCount": 2
}
}