Allows a message to be dismissed. Once dismissed the message will no longer appear in either ListMessageResponse or ListMessageSummaryResponse.

View interactive version here

Request Parameters

Parameter Required Type Description
messageId Yes string The messageId of the message to dismiss

Response Parameters

A response to a dismiss message request

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

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 DismissMessageRequest()
        .Send((response) => {
        GSData scriptData = response.ScriptData;

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.DismissMessageResponse):void {
        var scriptData:ScriptData = response.getScriptData(); 


    #import "GS.h"
    #import "GSAPI.h"
    GSDismissMessageRequest* request = [[GSDismissMessageRequest alloc] init];
    [request setMessageId:messageId;
    [request setCallback:^ (GSDismissMessageResponse* response) {
    NSDictionary* scriptData = [response getScriptData]; 
    [gs send:request];


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

    void DismissMessageRequest_Response(GS& gsInstance, const DismissMessageResponse& response) {
    GSData scriptData = response.getScriptData(); 

    DismissMessageRequest request(gsInstance);


import com.gamesparks.sdk.api.autogen.GSRequestBuilder.DismissMessageRequest;
import com.gamesparks.sdk.api.autogen.GSResponseBuilder.DismissMessageResponse;
import com.gamesparks.sdk.api.autogen.GSTypes.*;
import com.gamesparks.sdk.api.GSEventListener;

    .send(new GSEventListener<DismissMessageResponse>() {
        public void onEvent(DismissMessageResponse response) {

Cloud Code

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

var scriptData = response.scriptData; 
Did this page help you? Please enter your feedback below.