Messaging
Overview
Messaging is a new service that enables rich communications between end-users. It is available to all Plus plan subscriptions - and can optionally utilise brainCloud RTT to send messages in real-time.
Key concepts:
- used for directly addressed messages (via profileIds) - as opposed to Chat messages, which are sent to channels
- is not email (though it is modelled similarly)
- messages are sent within brainCloud only
- and only within a single app
- three types of messages - regular, system and bulk
- regular messages - sent by end-users.
- system messages - sent from the system (i.e. the app) - so the from field is
null - bulk messages - system messages sent to all users (NOT YET SUPPORTED - COMING SOON!)
- sends real-time events to online users when messages are received (if brainCloud RTT is enabled)
Message content format
{
"msgbox": "inbox",
"msgId": "<guidA>",
"mbCr": 1530070436834,
"mbUp": 1530070436834,
"mbVer": 1,
"message": {
"from": {
"id": "<profileIdA>",
"name": "Holly Leung",
"pic": "<optionalPicUrl>"
},
"to": [
"<profIleIdB>"
],
"sentAt": 1530070436834,
"content": {
"subject": "optional",
"text": "This is a test message"
}
}
}
Message fields
| Field | Description |
|---|---|
| msgbox | The box (inbox, sent) that the message is stored in |
| msgId | The chat message id (used for editing / deleting posted messages) |
| mbCr | Created at date+time in millis |
| mbUp | Last updated date+time in millis |
| mbVer | The version of the message |
| from | Information about the originating user |
| to | Array of message recipients |
| sentAt | Time+date in millis at which the message was sent |
| content | The message content. If plaintext, should contain a text field |
API Summary
Retrieving messages
Sending messages
Updating messages
Sys API Calls
These APIs target the shared content portion of a message, and not the per-user messagebox metadata (which controls whether a message has been read, etc.). Can be used on user or system messages.
Available via cleint session cloud code, as well as S2S.
Retrieving messages
Sending messages
Updating messages
📄️ DeleteMessages
Overview
📄️ GetMessageBoxes
Overview
📄️ GetMessageCounts
Overview
📄️ GetMessages
Overview
📄️ GetMessagesPage
Overview
📄️ GetMessagesPageOffset
Overview
📄️ MarkMessagesRead
Overview
📄️ SendMessage
Overview
📄️ SendMessageSimple
Overview
📄️ SysDeleteMessage
Overview
📄️ SysDeleteMessages
Overview
📄️ SysGetMessages
Overview
📄️ SysGetMessagesForOwnerPage
Overview
📄️ SysGetMessagesForOwnerPageOffset
Overview
📄️ SysGetMessagesPage
Overview
📄️ SysGetMessagesPageOffset
Overview
📄️ SysSendMessage
Overview
📄️ SysSendMessageSimple
Overview
📄️ SysUpdateMessage
Overview