Skip to main content
Version: 5.7.0

GetMessageCounts

Returns the total # of messages, and # of unread messages, per messagbox, for this user. Note that unread for sent messagebox will always be 0.

None.

ServiceOperation
messagingGET_MESSAGE_COUNTS

Method Parameters

None.

Usage

http://localhost:3000
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.GetMessageCounts(successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"inbox": {
"total": 1,
"unread": 1
},
"sent": {
"total": 1,
"unread": 0
}
}
}
Common Error Code

Status Codes

CodeNameDescription
40601FEATURE_NOT_ENABLEDMessaging feature is not enabled for app.