Admin Panel

APIs

AuthApi

constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

new AuthApi(config);
Parameters

config Configuration

The API key for your application. You can generate an API key in the Admin Panel for your application. Please note: Don’t expose the API key in unsecure environments like Web Apps.

generateAccessToken

AccessToken|Error generateAccessToken(ForeignUserIdentifier body);
Parameters

body ForeignUserIdentifier REQUIRED

Foreign user identifier.

Returns

AccessToken or Error

getUserChallengeNotificationTopic

NotificationTopic|Error getUserChallengeNotificationTopic(string challenge_id);

Get a topic to be used with an MQTT client to receive real time updates whenever the challenge changes.

Parameters

challenge_id string REQUIRED

The challenge id you want to get notified

Returns

NotificationTopic or Error

getUserChallengesNotificationTopic

NotificationTopic|Error getUserChallengesNotificationTopic();

Get a topic to be used with an MQTT client to receive real time updates whenever challenges for the user provided by the access token change.

Returns

NotificationTopic or Error

getUserBattlePassNotificationTopic

NotificationTopic|Error getUserBattlePassNotificationTopic(string battle_pass_id);

Get a topic to be used with an MQTT client to receive real time updates whenever a battle pass changes.

Parameters

battle_pass_id string REQUIRED

The battle pass you want to get notified

Returns

NotificationTopic or Error

getLeaderboardNotificationTopic

NotificationTopic|Error getLeaderboardNotificationTopic(string leaderboard_id);

Get a topic to be used with an MQTT client to receive real time updates whenever the specified leaderboard changes.

Parameters

leaderboard_id string REQUIRED

The id of the leaderboard you want to get notified

Returns

NotificationTopic or Error

getUserInfo

UserInfo|Error getUserInfo();

Returns additional info object with usernames and avatar image for a user which is used in the leaderboard system

Returns

UserInfo or Error

setUserInfo

UserInfo|Error setUserInfo(UserInfo body);

Sets user info like username and avatar image which is returned as part of the user rankings in leaderboards.

Parameters

body UserInfo REQUIRED

UserInfo object stored in the SCILL database for the user

Returns

UserInfo or Error

EventsApi

constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

new EventsApi(config);
Parameters

config Configuration

The API key for your application. You can generate an API key in the Admin Panel for your application. Please note: Don’t expose the API key in unsecure environments like Web Apps.

sendEvent

ActionResponse|UnknownChallengeError sendEvent(EventPayload body);

Post an event to the SCILL backend

Parameters

body EventPayload REQUIRED

Event payload or team event payload

Returns

ActionResponse or UnknownChallengeError

getAvailableEvents

EventDescription[] getAvailableEvents();

Get all available events and required and optional properties

Returns

EventDescription[]

ChallengesApi

constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

new ChallengesApi(config);
Parameters

config Configuration

You need to provide an access token that you previously generated with the EventsApi. Please check out the documentation about access tokens for more info.

getPersonalChallenges

ChallengeCategory[]|Error getPersonalChallenges(string appId, array include_categories?, array exclude_categories?, string language?);

Get personal challenges organized in categories

Parameters

appId string REQUIRED

The app id

include_categories array OPTIONAL

A list of categories that should be included in the response. Only the categories provided will be returned

exclude_categories array OPTIONAL

A list of categories that should be excluded from the response. All categories except those listed here will be returned

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ChallengeCategory[] or Error

getUnresolvedPersonalChallenges

ChallengeCategory[]|Error getUnresolvedPersonalChallenges(string appId, array include_categories?, array exclude_categories?, string language?);

Get personal challenges organized in categories that are not yet finished

Parameters

appId string REQUIRED

The app id

include_categories array OPTIONAL

A list of categories that should be included in the response. Only the categories provided will be returned

exclude_categories array OPTIONAL

A list of categories that should be excluded from the response. All categories except those listed here will be returned

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ChallengeCategory[] or Error

getAllPersonalChallenges

ChallengeCategory[]|Error getAllPersonalChallenges(string appId, array include_categories?, array exclude_categories?, string language?);

Get personal challenges organized in categories that are not yet finished

Parameters

appId string REQUIRED

The app id

include_categories array OPTIONAL

A list of categories that should be included in the response. Only the categories provided will be returned

exclude_categories array OPTIONAL

A list of categories that should be excluded from the response. All categories except those listed here will be returned

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ChallengeCategory[] or Error

getPersonalChallengeById

Challenge|Error getPersonalChallengeById(string appId, string challengeId, string language?);

Get personal challenges organized in categories

Parameters

appId string REQUIRED

The app id

challengeId string REQUIRED

The challenge id (see challenge_id of Challenge object)

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

Challenge or Error

getActivePersonalChallenges

ChallengeCategory[]|Error getActivePersonalChallenges(string appId, string language?);

Get active personal challenges organized in categories

Parameters

appId string REQUIRED

The app id

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ChallengeCategory[] or Error

unlockPersonalChallenge

ActionResponse|Error unlockPersonalChallenge(string appId, string challengeId, string language?);

Unlock a personal challenge by product id and challenge id

Parameters

appId string REQUIRED

The app id

challengeId string REQUIRED

The challenge id (see challenge_id of Challenge object)

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ActionResponse or Error

activatePersonalChallenge

ActionResponse|Error activatePersonalChallenge(string appId, string challengeId, string language?);

Activate a personal challenge by product id and user challenge id

Parameters

appId string REQUIRED

The app id

challengeId string REQUIRED

The challenge id (see challenge_id of Challenge object)

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ActionResponse or Error

cancelPersonalChallenge

ActionResponse|Error cancelPersonalChallenge(string appId, string challengeId, string language?);

Cancel an active personal challenge by product id and user challenge id

Parameters

appId string REQUIRED

The app id

challengeId string REQUIRED

The challenge id (see challenge_id of Challenge object)

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ActionResponse or Error

claimPersonalChallengeReward

ActionResponse|Error claimPersonalChallengeReward(string appId, string challengeId, string language?);

Claim the reward of a finished personal challenge by product id and user challenge id

Parameters

appId string REQUIRED

The app id

challengeId string REQUIRED

The challenge id (see challenge_id of Challenge object)

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ActionResponse or Error

generateWebsocketAccessToken

SocketToken|Error generateWebsocketAccessToken();

Get an access token for the Websockets server notifying of updates in real time

Returns

SocketToken or Error

BattlePassesApi

constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

new BattlePassesApi(config);
Parameters

config Configuration

You need to provide an access token that you previously generated with the EventsApi. Please check out the documentation about access tokens for more info.

getBattlePasses

BattlePass[]|Error getBattlePasses(string appId, string language?);

Get battle passes for the product

Parameters

appId string REQUIRED

The app id

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

BattlePass[] or Error

getActiveBattlePasses

BattlePass[]|Error getActiveBattlePasses(string appId, string language?);

Get active battle passes for the app

Parameters

appId string REQUIRED

The app id

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

BattlePass[] or Error

getUnlockedBattlePasses

BattlePass[]|Error getUnlockedBattlePasses(string appId, string language?);

Get unlocked battle passes for the user encoded in the access token

Parameters

appId string REQUIRED

The app id

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

BattlePass[] or Error

getBattlePass

BattlePass|Error getBattlePass(string appId, string battlePassId, string language?);

Get battle pass for the product with id

Parameters

appId string REQUIRED

The app id

battlePassId string REQUIRED

The id of the battle pass. It’s the same as in battle_pass_id you received in earlier requests (i.e. getting all active battle passes for a product).

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

BattlePass or Error

getBattlePassLevels

BattlePassLevel[]|Error getBattlePassLevels(string appId, string battlePassId, string language?);

Get battle pass levels for a battle pass

Parameters

appId string REQUIRED

The app id

battlePassId string REQUIRED

The id of the battle pass. It’s the same as in battle_pass_id you received in earlier requests (i.e. getting all active battle passes for a product).

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

BattlePassLevel[] or Error

getAllBattlePassLevels

BattlePassLevel[]|Error getAllBattlePassLevels(string appId, string language?);

Get all battle pass levels for an app

Parameters

appId string REQUIRED

The app id

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

BattlePassLevel[] or Error

activateBattlePassLevel

ActionResponse|Error activateBattlePassLevel(string appId, string levelId, string language?);

Activate a given battle pass level by id

Parameters

appId string REQUIRED

The app id

levelId string REQUIRED

The id of the battle pass level.

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ActionResponse or Error

claimBattlePassLevelReward

ActionResponse|Error claimBattlePassLevelReward(string appId, string levelId, string language?);

Claim the battle pass level id

Parameters

appId string REQUIRED

The app id

levelId string REQUIRED

The id of the battle pass level.

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

ActionResponse or Error

unlockBattlePass

BattlePassUnlockInfo|Error unlockBattlePass(string appId, string battlePassId, string language?);

Unlock the battle pass for a user

Parameters

appId string REQUIRED

The app id

battlePassId string REQUIRED

The id of the battle pass. It’s the same as in battle_pass_id you received in earlier requests (i.e. getting all active battle passes for a product).

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

BattlePassUnlockInfo or Error

LeaderboardsApi

constructor

It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.

new LeaderboardsApi(config);
Parameters

config Configuration

You need to provide an access token that you previously generated with the EventsApi. Please check out the documentation about access tokens for more info.

getLeaderboard

Leaderboard|Error getLeaderboard(string leaderboardId, number currentPage?, number pageSize?, string language?);

Provides the current leaderboard rankings for a specific leaderboard.

Parameters

leaderboardId string REQUIRED

The id of the leaderboard

currentPage int OPTIONAL

The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1

pageSize int OPTIONAL

The number of elements per page. Default is 25.

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

Leaderboard or Error

getLeaderboards

Leaderboard[]|Error getLeaderboards(number currentPage?, number pageSize?, string language?);

Returns an array of Leaderboard items defined for the application.

Parameters

currentPage int OPTIONAL

The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1

pageSize int OPTIONAL

The number of elements per page. Default is 25.

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

Leaderboard[] or Error

getLeaderboardRankings

LeaderboardMemberRanking[]|Error getLeaderboardRankings(string memberType, string memberId, string language?);

Returns an array of LeaderboardRanking items defined for all leaderboards in the application specified for the user. If the member is not in the leaderboard, the rank will be -1 in the LeaderboardRanking object.

Parameters

memberType string REQUIRED

The member type, can be user or team (right now) and sets which leaderboards should be selected.

memberId string REQUIRED

Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

LeaderboardMemberRanking[] or Error

getLeaderboardRanking

LeaderboardMemberRanking|Error getLeaderboardRanking(string memberType, string memberId, string leaderboardId, string language?);

Returns a LeaderboardMemberRanking item for the specified leaderboard. Use this route to get the position of a user of team in a specified leaderboard.

Parameters

memberType string REQUIRED

The member type, can be user or team (right now) and sets which leaderboards should be selected.

memberId string REQUIRED

Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.

leaderboardId string REQUIRED

The id of the leaderboard

language string OPTIONAL

Set the language. Content can be translated in the Admin Panel. Values can be international language codes like de, en, fr, it, …

Returns

LeaderboardMemberRanking or Error