Work with Player Names
When possible, LootLocker will attach a name to the player when starting a session. This however, is only possible for platforms where the player has a name already, such as Steam or PlayStation Network.
Platforms Supporting Automatic Names
Platforms where the name is automatically retrieved when starting a session:
Steam
PlayStation Network
If you're using a platform without automatic player names, or want to update the name LootLocker has stored for the player, it's possible to change the name using the SDK or API.
Player names can also be viewed in the web console:

Unique Player Names
If you want to ensure that no two players in your game has the same name, you can use the Unique Player Names setting in your games settings.
Enabling this toggle, will return an error when updating a players name, if that name is already taken.
Update Player Name in Game
LootLockerSDKManager.SetPlayerName("Some other name", (response) =>
{
if (response.success)
{
Debug.Log("Successfully set player name");
} else
{
Debug.Log("Error setting player name");
}
});
var response = await LL_Players.SetPlayerName.new("a-new-name").send()
if(!response.success) :
# Request failed, handle errors
pass
else:
# Request succeeded, use response as applicable in your game logic
passcurl -X PATCH "https://api.lootlocker.io/game/player/name" \
-H "x-session-token: your_token_here" \
-H "LL-Version: 2021-03-01" \
-H "Content-Type: application/json" \
-d "{\"name\": \"Player Name\"}"Example response:
{
"name": "Player Name"
}Retrieve Player Name in Game
LootLockerSDKManager.GetPlayerName((response) =>
{
if (response.success)
{
Debug.Log("Successfully retrieved player name: " + response.name);
} else
{
Debug.Log("Error getting player name");
}
});
var response = await LL_Players.GetPlayersActiveName.new().send()
if(!response.success):
# Request failed, handle errors
pass
else:
# Request succeeded, use response as applicable in your game logic
passcurl -X GET "https://api.lootlocker.io/game/player/name" \
-H "x-session-token: your_token_here" \
-H "LL-Version: 2021-03-01"Example response:
{
"name": "Player Name"
}Lookup Multiple Player Names using Player IDs
ulong player1ID = 1;
ulong player2ID = 2;
ulong player3ID = 3;
LootLockerSDKManager.LookupPlayerNamesByPlayerIds(new ulong[] { player1ID, player2ID, player3ID }, response =>
{
if (response.success)
{
foreach (var player in response.players)
{
Debug.Log(player.player_id);
Debug.Log(player.player_public_uid);
Debug.Log(player.name);
Debug.Log(player.last_active_platform);
Debug.Log(player.platform_player_id);
}
} else
{
Debug.Log("Error looking up player names");
}
});curl -G "https://api.lootlocker.io/game/player/lookup/name" \
-H "x-session-token: your_token_here" \
-H "LL-Version: 2021-03-01" \
-d player_id=1 \
-d player_id=2 \
-d player_public_uid=JARL7PGR \
-d player_guest_login_id=a270686a-7dd7-482f-89b6-9b2a634f46fb \
-d steam_id=9465748036854778475 \
-d psn_id=1234567890 \
-d xbox_id=E51D19530BBE721286F75C03B934E5EB7CA23B99Example response:
{
"players": [
{
"player_id": 1,
"player_public_uid": "6DDXH947",
"name": "Player 1 Name",
"last_active_platform": "xbox_one"
},
{
"player_id": 2,
"player_public_uid": "4FDGF738",
"name": "Player 2 Name",
"last_active_platform": "xbox_one"
},
{
"player_id": 3,
"player_public_uid": "JARL7PGR",
"name": "Player 3 Name",
"last_active_platform": "guest"
},
{
"player_id": 4,
"player_public_uid": "9HDK4F5Y",
"name": "Player 4 PSN Name",
"last_active_platform": "psn",
"platform_player_id": "1234567890"
},
{
"player_id": 5,
"player_public_uid": "3XTMHFS3",
"name": "Player 5 Steam Name",
"last_active_platform": "steam",
"platform_player_id": "9465748036854778475"
},
{
"player_id": 6,
"player_public_uid": "9RKPSRRT",
"name": "Player 6 XBox Name",
"last_active_platform": "xbox_one",
"platform_player_id": "E51D19530BBE721286F75C03B934E5EB7CA23B99"
},
{
"player_id": 7,
"player_public_uid": "T4HV7G5D",
"name": "Player 7 GuestLogin Name",
"last_active_platform": "guest",
"platform_player_id": "a270686a-7dd7-482f-89b6-9b2a634f46fb"
}
]
}Multiple platforms and public UID is also supported:
- LookupPlayerNamesByPlayerPublicUIds(string[] playerPublicUIds, Action onComplete)
- LookupPlayerNamesBySteamIds(ulong[] steamIds, Action onComplete)
- LookupPlayerNamesBySteamIds(string[] steamIds, Action onComplete)
- LookupPlayerNamesByPSNIds(ulong[] psnIds, Action onComplete)
- LookupPlayerNamesByPSNIds(string[] psnIds, Action onComplete)
- LookupPlayerNamesByXboxIds(string[] xboxIds, Action onComplete)Last updated


