SysGetMessages
tip
This method is available in Cloud Code scripts only.
Retrieves the specified message, irregardless of ownership.
Service | Operation |
---|---|
messaging | SYS_GET_MESSAGES |
Method Parameters
Parameter | Description |
---|---|
msgIds | An array of the ids of messages to retrieve. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var msgIds = [ "msgId1", "msgId2" ];
var messagingProxy = bridge.getMessagingServiceProxy();
var postResult = messagingProxy.sysGetMessages(msgIds);
if (postResult.status == 200) {
// Success!
}
{
"service": "messaging",
"operation": "SYS_GET_MESSAGES",
"data": {
"msgIds": [
"msgId1",
"msgId2"
]
}
}
JSON Response
{
"status": 200,
"data": {
}
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40601 | FEATURE_NOT_ENABLED | Messaging feature is not enabled for app. |