LootLocker
The BasicsGame SystemsContent ManagementPlayer Management
LootLocker
  • 📌The Basics
    • Getting Started
    • What is LootLocker?
    • Core Concepts
      • Players
      • Assets
      • Character Classes
      • API Types
      • Web Console
      • Stage & Live Environments
      • Glossary
    • Unity Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • Unreal Quick Start
      • Install & Configure the SDK
        • Older versions
      • Authenticate Your First Player
    • Godot Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • SDKs
    • Samples
      • Authentication Samples
      • Leaderboard Samples
      • Progression Samples
      • Player Samples
    • Launching Your Game
    • Support
      • Error Codes
      • Unreal Marketplace Plugin Support
  • 🎭Players
    • Overview
    • Authentication
      • How To
        • Guest Login
        • Steam
        • Apple
        • Apple Game Center
        • Google
        • Epic Games
        • PlayStation
        • Meta / Oculus
        • Xbox
        • Nintendo Switch
    • Files
      • How To
        • Manage Files in Web Console
        • Work with Files In-Game
    • Inventory
      • How To
        • Work with Player Inventory
    • Messages
      • How To
        • Configure Messages in Web Console
    • Names
      • How To
        • Work with Player Names
    • Player Manager
      • How To
        • Manage Players through Web Console
        • Manage Players In-Game
        • Use Player Operations
    • Unified Player Accounts
      • How To
        • Configure UPA in Web Console
        • Use Remote Login In-Game
        • Connect Identiy Provider to Player
        • External Provider Linking
        • Transition from Guest Login to Other Provider
        • Disconnect Identity Provider from Player
    • White Label Login
      • How To
        • Configure White Label Login
        • Create a New White Label User
        • Request User Verification
        • Handle Returning Users
        • Start a White Label Session
  • 🪙Commerce
    • Overview
    • Catalogs
      • How To
        • Configure Catalogs in LootLocker Console
        • List all Catalogs
        • Use Catalogs In-Game
        • Setup In-Game Store
    • Currencies
      • How To
        • Configure a Currency in Web Console
        • Use Currencies In-Game
    • DLC Management
      • How To
        • Configure DLC in Web Console
        • Use DLC In-Game
    • Entitlements
      • How To
        • Work with Entitlements In-Game
    • Real Money Purchases
      • How To
        • Configure In-App Purchase in Web Console
        • Make Purchases through Google Play Store
        • Make Purchases through Apple Store
        • Make Purchases through Steam Store
    • Virtual Purchases
    • Wallets
      • How To
        • Manage a Wallet in Web Console
        • Use Wallets In-Game
  • ⚔️Content
    • Overview
    • Assets
      • How To
        • Create & Configure an Asset
        • Organize & Search for Assets
        • Retrieve Assets In-Game
        • Set up Asset Storage Template
        • Check Grant Notifications
        • Set up a Game Config Asset
        • Create a Loot Box
        • Work with Loot Boxes In-Game
        • Create a Drop Table
        • Work with Drop Tables In-Game
        • Create a Rental Asset
        • Work with Rental Assets In-Game
    • User Generated Content (UGC)
      • How To
        • Create UGC In-Game
    • Twitch Drops
  • 🕹️Game Systems
    • Overview
    • Classes & Heroes
      • How To
        • Base Classes
        • Hero Classes
        • Implement Classes In-Game
        • Implement Heroes In-Game
    • Leaderboards
      • How To
        • Configure Leaderboard in Web Console
        • Use Player Leaderboards
        • Use Generic Leaderboards
        • Use Metadata to Store Additional Information
        • Use Scheduled Reset with Rewards
        • Use Leaderboards for Time Based Rankings
      • Leaderboard FAQ
      • GameMaker References
    • Feedback
      • How To
        • Manage Feedback Categories
        • Create Player Feedback
        • Create UGC Feedback
        • Create Game Feedback
        • View and Manage Feedback
    • Progressions
      • How To
        • Create a Progression
        • Game Progressions
        • Player Progressions
        • Class Progressions
        • Asset Instance Progressions
    • Triggers
      • How To
        • Setup a trigger in the Web Console
        • Invoke trigger from game
  • ⛓️Shared Systems
    • Overview
    • Metadata
      • How To
        • Add Metadata in Console
        • Fetch a Single Metadata In-Game
        • Fetch Metadata In-Game by Tags
        • Fetch Metadata In-Game from Multiple Sources
    • Notifications
      • How To
        • List Notifications and Mark as Read In-Game
  • 🗝️Admin
    • Settings
    • User Settings
    • Organization Settings
    • CORS Allowlist
  • ⭕️ Legacy
    • Deprecations
      • Unity SDK Deprecation Log
        • Version 2.1.5 - Migration to Open UPM
        • Version 2.0.0
      • Unreal SDK Deprecation Log
        • Version 4.0.0
        • Version 3.0.0
    • Legacy Storage
    • Legacy Triggers
      • Activate a trigger
      • Create a trigger
    • Legacy Progressions
      • Create a Progression System
      • Use a Progression System In-Game
Powered by GitBook
On this page
  1. Players
  2. White Label Login
  3. How To

Start a White Label Session

PreviousHandle Returning UsersNextOverview

Last updated 2 months ago

White Label login works a little differently than other platforms in the sense that we first have to create a White Label login session, which is then used to create a game session. When the White Label Account is logged in the SDK will save the token and use it to create a Game Session.

The LootLocker SDKs provide a single method for the complete login flow. If you for some reason need to separate the steps, that is possible as well if you follow .

// Remember to use the LootLocker namespace in the top of your file.
using LootLocker.Requests;

// This code should be placed in a handler when user clicks the login button.
string email = "user@lootlocker.io";
string password = "password here";
bool rememberMe = true;
LootLockerSDKManager.WhiteLabelLoginAndStartSession(email, password, rememberMe, response =>
{
    if (!response.success)
    {
        if (!response.LoginResponse.success) {
            Debug.Log("error while logging in");
        } else if (!response.SessionResponse.success) {
            Debug.Log("error while starting session");
        }
        return;
    }

     // Handle Returning Player
});

Input

You need to exchange the TriggerLogin event for whatever event you want to use to trigger the flow.

Output

We recommend branching the completed events on the success flag, and if you do this you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.

For subsequent calls to different LootLocker methods you will want to create variables from the Player Id and Player Identifier outputs.

Since this method is behind the scenes a two step process, first login and then starting a game session, you can access the individual responses for debugging purposes using the LoginResponse and StartSessionResponse properties.


var response = await LL_WhiteLabel.LoginAndStartSession.new("an-email>", "a-password").send()
if(!response.success) :
    # Request failed, handle errors
    pass
else:
    # Request succeeded, use response as applicable in your game logic
    pass

First login to get the session token

curl -X POST "https://api.lootlocker.io/white-label-login/login" \
  -H "domain-key: 11aaa11" \
  -H "is-development: true" \
  -H "Content-Type: application/json" \
  -d "{\"email\": \"test@lootlocker.io\", \"password\": \"some password here\", \"remember\": true}"

Example response:

{
  "id": 406,
  "game_id": 2,
  "email": "test@lootlocker.io",
  "created_at": "2021-08-25T08:03:34.612346459Z",
  "updated_at": "2021-08-25T08:03:34.612346459Z",
  "deleted_at": null,
  "validated_at": null,
  "session_token": "afccd38d-09d5-48aa-8235-b9c4c9151596"
}

Now you can use the session token to start a game session with the following call:

curl -X POST "https://api.lootlocker.io/game/v2/session/white-label" \
  -H "Content-Type: application/json" \
  -d "{\"game_key\": \"your_game_key\", \"email\": \"test@lootlocker.io\", \"token\": \"afccd38d-09d5-48aa-8235-b9c4c9151596\", \"game_version\": \"0.10.0.0\"}"

Example response:

{
  "success": true,
  "session_token": "e6fa44946f077dd9fe67311ab3f188c596df9969",
  "player_id": 3,
  "public_uid": "TSEYDXD8",
  "player_created_at": "2022-05-30T07:56:01+00:00",
  "check_grant_notifications": true,
  "check_deactivation_notifications": false,
  "seen_before": true
}

Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our and decide which ones you want to use in your game.

This requires that you have

Above is an example of how to implement login and starting a game session with a White Label account using blueprints in Unreal Engine. For an example you can copy and paste into your editor, .

Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our and decide which ones you want to use in your game.

Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our and decide which ones you want to use in your game.

🎭
these instructions
feature set
set up the Unreal SDK in your game.
look here
feature set
feature set
Shows an example of how to implement login and starting a game sessioin using a White Label account in Unreal Blueprints - see link: https://blueprintue.com/blueprint/ifhc8tck/
Blueprint example of Logging in and starting a game session with a White Label account