Skip to main content
Version: 5.7.0

GetMessagesPageOffset

Returns the next/prev set of messages. Takes the encoded-context from GetMessagesPage as a parameter.

ServiceOperation
messagingGET_MESSAGES_PAGE_OFFSET

Method Parameters

ParameterDescription
contextThe encoded context string returned from the server from a previous call to GetMessagesPage or GetMessagesPageOffset.
pageOffsetThe positive or negative page offset to fetch. Uses the last page retrieved using the context string to determine a starting point.

Usage

http://localhost:3000
string context = "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbnRpdHlUeXBlIjp7IiRyZWdleCI6Ii4qaWxkLioiLCIkb3B0";
int pageOffset = 1;
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.GetMessagesPageOffset(context, pageOffset, successCallback, failureCallback);
JSON Response
{
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJnYW1lSWQiOiIxMzIyOSJ9LCJzb3J0Q3JpdGVyaWEiOnsibWJDciI6MSwibWJVcCI6LTF9LCJwYWdpbmF0aW9uIjp7InJvd3NQZXJQYWdlIjoxMCwicGFnZU51bWJlciI6MSwiZG9Db3VudCI6ZmFsc2UsInNraXBSZWNvdW50IjpmYWxzZX0sIm9wdGlvbnMiOm51bGwsInJlc3VsdENvdW50IjozfQ",
"results": {
"count": 10,
"page": 2,
"items": [
{
"mbVer": 1,
"mbUp": 1731088159417,
"read": false,
"msgCr": 1731088159385,
"msgVer": 1,
"mbCr": 1731088159417,
"msgId": "dbaedd3c-17d9-4b04-a0cb-d230d44b8ebc",
"msgUp": 1731088159385,
"message": {
"from": {
"id": "43c4f25e-cac5-4523-b124-ad05ccb9e7c3",
"name": "test1@team12416.testinator.com"
},
"sentAt": 1731088159369,
"to": ["ba0b372c-3c31-48aa-9577-37684abcfcdd"],
"content": {
"subject": "Chat and messaging features are here!",
"text": "Check out the new chat and messaging features!"
}
},
"msgbox": "sent"
},
{
"mbVer": 1,
"mbUp": 1732813809385,
"read": false,
"msgCr": 1732813809339,
"msgVer": 1,
"mbCr": 1732813809385,
"msgId": "eaa69580-f95f-401d-9d9f-92fc0895cc4d",
"msgUp": 1732813809339,
"message": {
"from": {
"id": "43c4f25e-cac5-4523-b124-ad05ccb9e7c3",
"name": "test1@team12416.testinator.com"
},
"sentAt": 1732813809323,
"to": ["43c4f25e-cac5-4523-b124-ad05ccb9e7c3"],
"content": {
"subject": "Chat and messaging features are here!",
"text": "Check out the new chat and messaging features!"
}
},
"msgbox": "sent"
},
{
"mbVer": 1,
"mbUp": 1732813809419,
"read": false,
"msgCr": 1732813809339,
"msgVer": 1,
"mbCr": 1732813809419,
"msgId": "eaa69580-f95f-401d-9d9f-92fc0895cc4d",
"msgUp": 1732813809339,
"message": {
"from": {
"id": "43c4f25e-cac5-4523-b124-ad05ccb9e7c3",
"name": "test1@team12416.testinator.com"
},
"sentAt": 1732813809323,
"to": ["43c4f25e-cac5-4523-b124-ad05ccb9e7c3"],
"content": {
"subject": "Chat and messaging features are here!",
"text": "Check out the new chat and messaging features!"
}
},
"msgbox": "inbox"
}
],
"moreAfter": true,
"moreBefore": true
}
},
"status": 200
}
Common Error Code

Status Codes

CodeNameDescription
40601FEATURE_NOT_ENABLEDMessaging feature is not enabled for app.