Admin Panel

SCILLBackend

Use this class to initiate the backend side API. This API requires an API key to setup which should not be exposed in unsafe client applications.

Constructor

Initiate an instance of the SCILLBackend class with your API Key generated in the Admin Panel.

Use the functions getters to get a shared instance of the API classes. SCILLBackend sets them up correctly for production use and with the correct authentication system.

public SCILLBackend(string apiKey);
Parameters

accessToken string

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.

AuthApi (Getter)

Returns a shared, lazy loaded instance of the AuthApi. It’s used to generate access tokens.

static AuthApi AuthApi;

EventsApi (Getter)

Returns a shared, lazy loaded instance of the EventsApi. It’s used to send events required for challenges and battle passes.

public EventsApi EventsApi;

GetAccessToken

Returns an access token for the provided user id. Please consult documentation on user ids. Please note: This is blocking the main thread. Use GetAccessTokenAsync if this should be multithreaded (recommended).

public string GetAccessToken(string userId);
Parameters

userId string

The unique user id identifying the “current user”. This can be any string and its up to you which type of data you send here. User Ids may not change as challenge progress is sent via events with the same user id.

GetAccessTokenAsync

Returns an access token for the provided user id. Please consult documentation on user ids.

public Task<string> GetAccessTokenAsync(string userId);
Parameters

userId string

The unique user id identifying the “current user”. This can be any string and its up to you which type of data you send here. User Ids may not change as challenge progress is sent via events with the same user id.