Returns the list of configured challenge types.

View interactive version here

Request Parameters

Parameter Required Type Description

Response Parameters

A response containing the list of configured challenge types in the game

Parameter Type Description
challengeTemplates ChallengeType[] A list of JSON objects containing the challenge templates for the game
scriptData ScriptData A JSON Map of any data added either to the Request or the Response by your Cloud Code

Nested types


Parameter Type Description
challengeShortCode string The shortCode for this challenge.
description string The description of this challenge.
getleaderboardName string The name of the leaderboard for this challenge.
name string The name of this challenge.
tags string The tags for this challenge.


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 ListChallengeTypeRequest()
        .Send((response) => {
        GSEnumerable<ListChallengeTypeResponse._ChallengeType> challengeTemplates = response.ChallengeTemplates;
        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.ListChallengeTypeResponse):void {
        var challengeTemplates:Vector.<ChallengeType> = response.getChallengeTemplates(); 
        var scriptData:ScriptData = response.getScriptData(); 


    #import "GS.h"
    #import "GSAPI.h"
    GSListChallengeTypeRequest* request = [[GSListChallengeTypeRequest alloc] init];
    [request setCallback:^ (GSListChallengeTypeResponse* response) {
    NSArray* challengeTemplates = [response getChallengeTemplates]; 
    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 ListChallengeTypeRequest_Response(GS& gsInstance, const ListChallengeTypeResponse& response) {
    gsstl:vector<Types::ChallengeType*> challengeTemplates = response.getChallengeTemplates(); 
    GSData scriptData = response.getScriptData(); 

    ListChallengeTypeRequest request(gsInstance);


import com.gamesparks.sdk.api.autogen.GSRequestBuilder.ListChallengeTypeRequest;
import com.gamesparks.sdk.api.autogen.GSResponseBuilder.ListChallengeTypeResponse;
import com.gamesparks.sdk.api.autogen.GSTypes.*;
import com.gamesparks.sdk.api.GSEventListener;

    .send(new GSEventListener<ListChallengeTypeResponse>() {
        public void onEvent(ListChallengeTypeResponse response) {
            List<ChallengeType> challengeTemplates = response.getChallengeTemplates(); 

Cloud Code

    var request = new SparkRequests.ListChallengeTypeRequest();
    var response = request.Send();

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