Skip to main content
Version: 5.7.0

GetMessages

Return the content of the specified messages (if found).

ServiceOperation
messagingGET_MESSAGES

Method Parameters

ParameterDescription
msgboxThe messagebox that the messages reside in
msgidsAn array of message ids
markAsReadWhether the messages should be marked as read once retrieved.

Usage

http://localhost:3000
string msgbox = "inbox";
string[] msgIds = { "msgId1", "msgId2" };
bool markAsRead = false;
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.MessagingService.GetMessages(msgbox, msgIds, markAsRead, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"requested": 2,
"actual": 2,
"items": [
{
"msgbox": "inbox",
"msgId": "0b102b77-5478-4bf4-b212-1b26d03d2dd6",
"mbVer": 1,
"mbCr": 1530289175397,
"mbUp": 1530289175397,
"read": false,
"message": {
"from": {
"id": "c3a455de-27f5-4126-a051-0effb1c75fd3",
"name": ""
},
"to": ["c3a455de-27f5-4126-a051-0effb1c75fd3"],
"sentAt": 1530289175381,
"content": {
"subject": "Message 1",
"text": "Message 1"
}
}
},
{
"msgbox": "inbox",
"msgId": "5a11e6e3-7bbd-46ef-85ec-797d22eb3486",
"mbVer": 1,
"mbCr": 1530289180524,
"mbUp": 1530289180524,
"read": false,
"message": {
"from": {
"id": "c3a455de-27f5-4126-a051-0effb1c75fd3",
"name": ""
},
"to": ["c3a455de-27f5-4126-a051-0effb1c75fd3"],
"sentAt": 1530289180520,
"content": {
"subject": "Message 2",
"text": "Message 2"
}
}
}
]
}
}
Common Error Code

Status Codes

CodeNameDescription
40601FEATURE_NOT_ENABLEDMessaging feature is not enabled for app.