Last Updated: 10/27/2021, 8:09:47 AM

# Profile

# Overview

Profile services allow players to display information about themselves such as their Name, Location, Date of Birth, and Photos. Beyond these basic attributes, you can also create your own attributes to customize the player profiles for your game. For example, you can add attributes that include a player’s level or rank. When you add these attributes to the Profile service, that information will be displayed on each player’s profile.

# Custom Attributes

Custom Attributes can be implemented using the SDK. In the sample code below four custom attributes have been added: level, rank, equipped sword, and equipped shield. When this code is implemented, these attributes will appear in each player’s profile.

 "userId": "string",  
 "namespace": "string",  
 "firstName": "string",  
 "lastName": "string",  
 "avatarSmallUrl": "string",  
 "avatarUrl": "string",  
 "avatarLargeUrl": "string",  
 "status": "ACTIVE",  
 "language": "string",  
 "timeZone": "string",  
 "dateOfBirth": "2019-12-22",  
 "customAttributes": {  
 "level": "1",  
 "rank": "Grand Master",  
 "activeWeapon": "Copper Sword",  
 "activeShield": "Pot Lid"  

# Tutorials

# Basic Profile

# Create a Player Profile

To create a player profile, you can use the following function.

# Retrieve a Player’s Profile

You can retrieve a player profile using the following function. This function will retrieve the player’s personal information, such as First Name, Last Name, Language, etc. Check the Get My Profile Info (opens new window) endpoint to learn more about the output.

# Retrieve a Player’s Public Profile

If you need to get a player's public profile, you can use the following function. The public profile is the profile that other players see when interacting in the game. When retrieving a player’s public profile you will receive the player’s User ID, Namespace, Timezone, and Avatar URL.

# Update a Player Profile

Use the following function to update a player profile.

# Custom Attributes

# Create Custom Attributes

Custom attributes are parts of a UserProfile that are unique to a particular game, such as weapon type. You can create custom attributes when creating a UserProfile.

# Update Custom Attributes

The following function can be used to update a specific custom attribute field.

You can also update multiple fields that have the desired value using the following function.

# Retrieve Custom Attributes

You can retrieve a player profile with its custom attributes using the following function.