Player State
User state contains methods for accessing user-specific information like name and contact email.
It also provides access to the User Attributes APIs allowing you to assign key+value pairs to a user. These are primarily used in defining and filtering segments for Promotions.
New in 4.2, we've added our Timed Status Effects API. These API calls allow developers to associated a "status" with a user for a specified amount of time. The status will automatically be removed when it expires.
Active status effects are returned automatically during Authentication and via ReadUserState. They can also be retrieved directly via GetUserStatus.
API Summary
User Information
- ReadUserState - Read the state of the currently logged in user. Optional parameter: entityTypeFilter
- UpdateUserName - Update User name.
- UpdateContactEmail - Update contact email.
- UpdateUserPictureUrl - Update user picture URL.
- UpdateLanguageCode - Update's user language preference.
- UpdateTimeZoneOffset - Update's user timezone offset.
- UpdateSummaryFriendData - Update summary friend data.
- UpdateIsTester - Update flag indicating player is a tester or not.
Attributes
- GetAttributes - Get player attributes.
- UpdateAttributes - Update player attributes.
- RemoveAttributes - Remove player attributes.
Status
- SetUserStatus - Set timed status for a user
- GetUserStatus - Get user status
- ExtendUserStatus - Extend user's status
- ClearUserStatus - Deletes the specified status
Management
- Logout - Logs player out of the server.
- ResetUser - Deletes the data owned by the user but does not delete the user itself.
- DeleteUser - Deletes the user and data owned by the user.
- ResendValidationEmail - Resend validation email.
📄️ ClearUserStatus
Deletes the specified status.
📄️ DeleteUser
Completely deletes the user record and all data fully owned by the user. After calling this method, the user will need to re-authenticate and create a new profile.
📄️ ExtendUserStatus
Extends a user's status.
📄️ GetAttributes
Retrieve the user attributes.
📄️ GetUserStatus
Retrieve the specified user status effect. If statusName parameter is empty string returns all active status effects.
📄️ Logout
Logs user out of server.
📄️ ReadUserState
Read the state of the currently logged in user.
📄️ RemoveAttributes
Remove user attributes.
📄️ ResendValidationEmail
This method is available in Cloud Code scripts only.
📄️ ResetUser
Deletes the data owned by the user but does not delete the user itself.
📄️ SetUserStatus
Set timed status for a user.
📄️ UpdateAttributes
Update user attributes.
📄️ UpdateContactEmail
Update the user's contact email.
📄️ UpdateCountryCode
Update user's country code preference on their profile.
📄️ UpdateIsTester
Set a user's IsTester flag.
📄️ UpdateLanguageCode
Update user's language code preference on their profile.
📄️ UpdateSummaryFriendData
Updates the "friend summary data" associated with the logged in user.
📄️ UpdateTimezoneOffset
Sets the user's timezone offset.
📄️ UpdateUserName
Sets the user's name.
📄️ UpdateUserPictureUrl
Update User picture URL.