Understand the Session Registration Response

Besides the success boolean that is returned when registering a session, LootLocker also returns a host of other data upon successful session registration. This page will outline what to expect from a session registration response and what each individual response means. If you are not using the SDK, the response might look different.

This information can also be found in the Game API Reference Documentation

Session Registration Response

The standard session registration response looks like this.

USTRUCT(BlueprintType)
struct FLootLockerLevelThresholds
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
int32 current;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
bool current_is_prestige;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
int32 next;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
bool next_is_prestige;
};
USTRUCT(BlueprintType)
struct FLootLockerAuthenticationResponse : public FLootLockerResponse
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
int32 player_id;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
bool seen_before;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
bool check_grant_notifications;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
bool check_deactivation_notifications;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
int32 xp;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
int32 level;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
FLootLockerLevelThresholds level_thresholds;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
int32 account_balance;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLocker")
FString session_token;
};
USTRUCT(BlueprintType)
struct FLootLockerAuthenticationDefaultResponse : public FLootLockerResponse
{
GENERATED_BODY()
};

success lets you know if the session registration was successful.

session_token is the token you need to make additional calls to LootLocker. To see how to send that along with further requests, see Sending Subsequent Requests.

player_id is the ID of the player on the platform the game is currently running on (steamId, PSN id, etc).

seen_before indicates if there is an existing profile on the backend for this player. If not, this parameter will be false, otherwise it will always be true.

check_grant_notification is for cases where the registration of a session might have triggered asynchronously granting assets to the player. For example, during DLC migration. If this value is true, you should issue a request for the player asset notification endpoint no earlier than 5 minutes after registering the session.

check_deactivation_notifications is for letting users know that one of their assets have been deactivated since they last logged in, and can't be used. See Player Asset Deactivation Notifications.

check_dlcs will include the IDs of the DLCs you should check with the first party platform to see if the player owns them. If the player owns any of them, issue a call to the Initiate DLC Migration endpoint.

xp will return the player's XP count from the Progression system. If nothing has been set up, this will be empty.

level will return the player's level, based on their XP from the Progression system. If nothing has been set up, this will be empty.

level_thresholds will display the current threshold necessary to complete the progression level, and the threshold necessary to complete the next progression level. It will also indicate if either of these levels are flagged as Prestige Levels.

account_balance displays the amount of currency the player has, set up through the Currency system.

More detailed explanations of all API responses can be found here.