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
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
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
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
getUserInfo
UserInfo|Error getUserInfo();
Returns additional info object with usernames and avatar image for a user which is used in the leaderboard system
Returns
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
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
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
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
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
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
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
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
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
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
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
generateWebsocketAccessToken
SocketToken|Error generateWebsocketAccessToken();
Get an access token for the Websockets server notifying of updates in real time
Returns
SocketToken or Error
resetUserAppChallenges
ActionResponse|Error resetUserAppChallenges(string appId, string userId);
Resets all challenges for the given app ID and user ID
Parameters
appId string REQUIRED
The app id
userId string REQUIRED
The user id (
Returns
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
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
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
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
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
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
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
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
Leaderboards V2Api
constructor
It’s not recommended to manually initialize APIs. Please use SCILLClient class to initiate API instances.
new Leaderboards V2Api(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.
getLeaderboardV2
LeaderboardV2Results|Error getLeaderboardV2(string leaderboardId, string startDate?, string endDate?, string aggregate?, number currentPage?, number currentPosition?, number pageSize?, string language?);
Provides the selected leaderboard V2 rankings for a specific leaderboard.
Parameters
leaderboardId string REQUIRED
The id of the leaderboard
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
aggregate string OPTIONAL
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
currentPage int OPTIONAL
The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1
currentPosition int OPTIONAL
The starting leaderboard position from which the results should be loaded. The number of results is controlled via the pageSize variable. This parameter overrides the currentPage parameter.
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
getLeaderboardsV2
LeaderboardV2Results[]|Error getLeaderboardsV2(string startDate?, string endDate?, string aggregate?, number currentPage?, number currentPosition?, number pageSize?, string language?);
Returns an array of LeaderboardV2Results items defined for the application.
Parameters
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
aggregate string OPTIONAL
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
currentPage int OPTIONAL
The page index starting at 1. The number of pageSize elements are returned for each page. Default value is 1
currentPosition int OPTIONAL
The starting leaderboard position from which the results should be loaded. The number of results is controlled via the pageSize variable. This parameter overrides the currentPage parameter.
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
LeaderboardV2Results[] or Error
getLeaderboardV2Rankings
LeaderboardV2MemberRanking[]|Error getLeaderboardV2Rankings(string memberType, string memberId, string startDate?, string endDate?, string aggregate?, string language?);
Returns an array of LeaderboardV2MemberRanking 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.
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
aggregate string OPTIONAL
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
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
LeaderboardV2MemberRanking[] or Error
getLeaderboardV2Ranking
LeaderboardV2MemberRanking|Error getLeaderboardV2Ranking(string memberType, string memberId, string leaderboardId, string startDate?, string endDate?, string aggregate?, string language?);
Returns a LeaderboardV2MemberRanking 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
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
aggregate string OPTIONAL
The aggregate function for the calculation of the results - can be BEST (returns a single score - either the lowest if ASC sorting is used, or the highest if DESC is used) or SUM (default value - increments (sums up) the scores).
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
LeaderboardV2MemberRanking or Error
resetLeaderboardV2Rankings
ActionResponse|Error resetLeaderboardV2Rankings(string appId, string leaderboardId);
Deletes all leaderboard V2 data, i.e. reset the leaderboard V2.
Parameters
appId string REQUIRED
The application ID
leaderboardId string REQUIRED
The leaderboard ID
Returns
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 startDate?, string endDate?, 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.
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
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 startDate?, string endDate?, 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.
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
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
getLeaderboardRankings
LeaderboardMemberRanking[]|Error getLeaderboardRankings(string memberType, string memberId, string startDate?, string endDate?, 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.
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
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 startDate?, string endDate?, 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
startDate string OPTIONAL
The starting date for fetching results.
endDate string OPTIONAL
The ending date for fetching results.
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
resetLeaderboardRankings
ActionResponse|Error resetLeaderboardRankings(string memberType, string appId, string memberId);
Delete all leaderboard data, i.e. reset the leaderboard for the specified member.
Parameters
memberType string REQUIRED
The member type, can be user or team (right now) and sets which leaderboards should be selected.
appId string REQUIRED
The application ID
memberId string REQUIRED
Either the user_id or team_id you used when sending the events. The memberType flag identifies which one is used.