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

\SCILL\Model\AccessToken|\SCILL\Model\Error generateAccessToken(ForeignUserIdentifier body);
Parameters

body ForeignUserIdentifier

Foreign user identifier.

Returns

In case of a success, this function returns an instance of AccessToken. In case of a failure, this function returns an instance of Error or .

getUserChallengeNotificationTopic

\SCILL\Model\NotificationTopic|\SCILL\Model\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

The challenge id you want to get notified

Returns

In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error.

getUserChallengesNotificationTopic

\SCILL\Model\NotificationTopic|\SCILL\Model\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

In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error.

getUserBattlePassNotificationTopic

\SCILL\Model\NotificationTopic|\SCILL\Model\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

The battle pass you want to get notified

Returns

In case of a success, this function returns an instance of NotificationTopic. In case of a failure, this function returns an instance of Error.

getUserInfo

\SCILL\Model\UserInfo|\SCILL\Model\Error getUserInfo();

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

Returns

In case of a success, this function returns an instance of UserInfo. In case of a failure, this function returns an instance of Error.

setUserInfo

\SCILL\Model\UserInfo|\SCILL\Model\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

UserInfo object stored in the SCILL database for the user

Returns

In case of a success, this function returns an instance of UserInfo. In case of a failure, this function returns an instance of 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

\SCILL\Model\ActionResponse|\SCILL\Model\UnknownChallengeError sendEvent(EventPayload body);

Post an event to the SCILL backend

Parameters

body EventPayload

Event payload or team event payload

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of or UnknownChallengeError.

getAvailableEvents

\SCILL\Model\EventDescription[] getAvailableEvents();

Get all available events and required and optional properties

Returns

In case of a success, this function returns an instance of EventDescription[]. In case of a failure, this function returns an instance of .

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

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

Get personal challenges organized in categories

Parameters

appId string

The app id

include_categories array

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

exclude_categories array

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

language string

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

Returns

In case of a success, this function returns an instance of ChallengeCategory[]. In case of a failure, this function returns an instance of Error.

getUnresolvedPersonalChallenges

\SCILL\Model\ChallengeCategory[]|\SCILL\Model\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

The app id

include_categories array

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

exclude_categories array

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

language string

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

Returns

In case of a success, this function returns an instance of ChallengeCategory[]. In case of a failure, this function returns an instance of Error.

getAllPersonalChallenges

\SCILL\Model\ChallengeCategory[]|\SCILL\Model\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

The app id

include_categories array

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

exclude_categories array

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

language string

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

Returns

In case of a success, this function returns an instance of ChallengeCategory[]. In case of a failure, this function returns an instance of Error.

getPersonalChallengeById

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

Get personal challenges organized in categories

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

language string

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

Returns

In case of a success, this function returns an instance of Challenge. In case of a failure, this function returns an instance of Error.

getActivePersonalChallenges

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

Get active personal challenges organized in categories

Parameters

appId string

The app id

language string

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

Returns

In case of a success, this function returns an instance of ChallengeCategory[]. In case of a failure, this function returns an instance of Error.

unlockPersonalChallenge

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

Unlock a personal challenge by product id and challenge id

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

language string

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

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error.

activatePersonalChallenge

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

Activate a personal challenge by product id and user challenge id

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

language string

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

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error.

cancelPersonalChallenge

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

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

Parameters

appId string

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

language string

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

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error.

claimPersonalChallengeReward

\SCILL\Model\ActionResponse|\SCILL\Model\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

The app id

challengeId string

The challenge id (see challenge_id of Challenge object)

language string

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

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error.

generateWebsocketAccessToken

\SCILL\Model\SocketToken|\SCILL\Model\Error generateWebsocketAccessToken();

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

Returns

In case of a success, this function returns an instance of SocketToken. In case of a failure, this function returns an instance of 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

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

Get battle passes for the product

Parameters

appId string

The app id

language string

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

Returns

In case of a success, this function returns an instance of BattlePass[]. In case of a failure, this function returns an instance of Error.

getActiveBattlePasses

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

Get active battle passes for the app

Parameters

appId string

The app id

language string

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

Returns

In case of a success, this function returns an instance of BattlePass[]. In case of a failure, this function returns an instance of Error.

getUnlockedBattlePasses

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

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

Parameters

appId string

The app id

language string

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

Returns

In case of a success, this function returns an instance of BattlePass[]. In case of a failure, this function returns an instance of Error.

getBattlePass

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

Get battle pass for the product with id

Parameters

appId string

The app id

battlePassId string

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

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

Returns

In case of a success, this function returns an instance of BattlePass. In case of a failure, this function returns an instance of Error.

getBattlePassLevels

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

Get battle pass levels for a battle pass

Parameters

appId string

The app id

battlePassId string

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

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

Returns

In case of a success, this function returns an instance of BattlePassLevel[]. In case of a failure, this function returns an instance of Error.

getAllBattlePassLevels

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

Get all battle pass levels for an app

Parameters

appId string

The app id

language string

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

Returns

In case of a success, this function returns an instance of BattlePassLevel[]. In case of a failure, this function returns an instance of Error.

activateBattlePassLevel

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

Activate a given battle pass level by id

Parameters

appId string

The app id

levelId string

The id of the battle pass level.

language string

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

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error.

claimBattlePassLevelReward

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

Claim the battle pass level id

Parameters

appId string

The app id

levelId string

The id of the battle pass level.

language string

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

Returns

In case of a success, this function returns an instance of ActionResponse. In case of a failure, this function returns an instance of Error.

unlockBattlePass

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

Unlock the battle pass for a user

Parameters

appId string

The app id

battlePassId string

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

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

Returns

In case of a success, this function returns an instance of BattlePassUnlockInfo. In case of a failure, this function returns an instance of 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

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

Provides the current leaderboard rankings for a specific leaderboard.

Parameters

leaderboardId string

The id of the leaderboard

currentPage int

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

pageSize int

The number of elements per page. Default is 25.

language string

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

Returns

In case of a success, this function returns an instance of Leaderboard. In case of a failure, this function returns an instance of Error.

getLeaderboards

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

Returns an array of Leaderboard items defined for the application.

Parameters

currentPage int

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

pageSize int

The number of elements per page. Default is 25.

language string

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

Returns

In case of a success, this function returns an instance of Leaderboard[]. In case of a failure, this function returns an instance of Error.

getLeaderboardRankings

\SCILL\Model\LeaderboardMemberRanking[]|\SCILL\Model\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.

Parameters

memberType string

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

memberId string

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

language string

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

Returns

In case of a success, this function returns an instance of LeaderboardMemberRanking[]. In case of a failure, this function returns an instance of Error.

getLeaderboardRanking

\SCILL\Model\LeaderboardMemberRanking|\SCILL\Model\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

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

memberId string

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

leaderboardId string

The id of the leaderboard

language string

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

Returns

In case of a success, this function returns an instance of LeaderboardMemberRanking. In case of a failure, this function returns an instance of Error.