Returns the full details of a message.

View interactive version here

Request Parameters

Parameter Required Type Description
messageId Yes string The messageId of the message retreive

Response Parameters

A response containing the message data for a given message

Parameter Type Description
message JSON The message data
scriptData ScriptData A JSON Map of any data added either to the Request or the Response by your Cloud Code
status string The message status

Nested types


A collection of arbitrary data that can be added to a message via a Cloud Code script.

Parameter Type Description
myKey string An arbitrary data key
myValue JSON An arbitrary data value.

Code Samples


    using GameSparks.Api;
    using GameSparks.Api.Requests;
    using GameSparks.Api.Responses;
    new GetMessageRequest()
        .Send((response) => {
        GSData message = response.Message;
        GSData scriptData = response.ScriptData;
        string status = response.Status;

ActionScript 3

    import com.gamesparks.*;
    import com.gamesparks.api.requests.*;
    import com.gamesparks.api.responses.*;
    import com.gamesparks.api.types.*;

        .send(function(response:com.gamesparks.api.responses.GetMessageResponse):void {
        var message:Object = response.getMessage(); 
        var scriptData:ScriptData = response.getScriptData(); 
        var status:String = response.getStatus(); 


    #import "GS.h"
    #import "GSAPI.h"
    GSGetMessageRequest* request = [[GSGetMessageRequest alloc] init];
    [request setMessageId:messageId;
    [request setCallback:^ (GSGetMessageResponse* response) {
    NSDictionary* message = [response getMessage]; 
    NSDictionary* scriptData = [response getScriptData]; 
    NSString* status = [response getStatus]; 
    [gs send:request];


    #include <GameSparks/generated/GSRequests.h>
    using namespace GameSparks::Core;
    using namespace GameSparks::Api::Responses;
    using namespace GameSparks::Api::Requests;

    void GetMessageRequest_Response(GS& gsInstance, const GetMessageResponse& response) {
    GSData message = response.getMessage(); 
    GSData scriptData = response.getScriptData(); 
    gsstl::string status = response.getStatus(); 

    GetMessageRequest request(gsInstance);


import com.gamesparks.sdk.api.autogen.GSRequestBuilder.GetMessageRequest;
import com.gamesparks.sdk.api.autogen.GSResponseBuilder.GetMessageResponse;
import com.gamesparks.sdk.api.autogen.GSTypes.*;
import com.gamesparks.sdk.api.GSEventListener;

    .send(new GSEventListener<GetMessageResponse>() {
        public void onEvent(GetMessageResponse response) {
            GSData message = response.getMessage(); 
            String status = response.getStatus(); 

Cloud Code

    var request = new SparkRequests.GetMessageRequest();
    request.messageId = ...;
    var response = request.Send();

var message = response.message; 
var scriptData = response.scriptData; 
var status = response.status;