Authentication - Register PlayFab User

Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. You must supply either a username or an email address.

POST https://titleId.playfabapi.com/Client/RegisterPlayFabUser

Request Header

Name Required Type Description
None True
  • string

This API requires no authentication headers (usually provides one to other calls).

Request Body

Name Required Type Description
CustomTags
  • object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

DisplayName
  • string

An optional parameter for setting the display name for this title (3-25 characters).

Email
  • string

User email address attached to their account

EncryptedRequest
  • string

Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only).

InfoRequestParameters

Flags for which pieces of info to return for the user.

Password
  • string

Password for the PlayFab account (6-100 characters)

PlayerSecret
  • string

Player secret that is used to verify API request signatures (Enterprise Only).

RequireBothUsernameAndEmail
  • boolean

An optional parameter that specifies whether both the username and email parameters are required. If true, both parameters are required; if false, the user must supply either the username or email parameter. The default value is true.

TitleId True
  • string

Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected.

Username
  • string

PlayFab username for the account (3-20 characters)

Responses

Name Type Description
200 OK

Each account must have a unique email address in the PlayFab service. Once created, the account may be associated with additional accounts (Steam, Facebook, Game Center, etc.), allowing for added social network lists and achievements systems.

400 Bad Request

This is the outer wrapper for all responses with errors

Security

None

This API requires no authentication headers (usually provides one to other calls).

Type: apiKey
In: header

Definitions

ApiErrorWrapper

The basic wrapper around every failed API response

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

EntityTokenResponse
GetPlayerCombinedInfoRequestParams
PlayerProfileViewConstraints
RegisterPlayFabUserRequest
RegisterPlayFabUserResult

Each account must have a unique email address in the PlayFab service. Once created, the account may be associated with additional accounts (Steam, Facebook, Game Center, etc.), allowing for added social network lists and achievements systems.

UserSettings

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code
  • integer

Numerical HTTP code

error
  • string

Playfab error code

errorCode
  • integer

Numerical PlayFab error code

errorDetails
  • object

Detailed description of individual issues with the request object

errorMessage
  • string

Description for the PlayFab errorCode

status
  • string

String HTTP code

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

Name Type Description
Id
  • string

Unique ID of the entity.

Type
  • string

Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types

EntityTokenResponse

Name Type Description
Entity

The entity id and type.

EntityToken
  • string

The token used to set X-EntityToken for all entity based API calls.

TokenExpiration
  • string

The time the token will expire, if it is an expiring token, in UTC.

GetPlayerCombinedInfoRequestParams

Name Type Description
GetCharacterInventories
  • boolean

Whether to get character inventories. Defaults to false.

GetCharacterList
  • boolean

Whether to get the list of characters. Defaults to false.

GetPlayerProfile
  • boolean

Whether to get player profile. Defaults to false. Has no effect for a new player.

GetPlayerStatistics
  • boolean

Whether to get player statistics. Defaults to false.

GetTitleData
  • boolean

Whether to get title data. Defaults to false.

GetUserAccountInfo
  • boolean

Whether to get the player's account Info. Defaults to false

GetUserData
  • boolean

Whether to get the player's custom data. Defaults to false

GetUserInventory
  • boolean

Whether to get the player's inventory. Defaults to false

GetUserReadOnlyData
  • boolean

Whether to get the player's read only data. Defaults to false

GetUserVirtualCurrency
  • boolean

Whether to get the player's virtual currency balances. Defaults to false

PlayerStatisticNames
  • string[]

Specific statistics to retrieve. Leave null to get all keys. Has no effect if GetPlayerStatistics is false

ProfileConstraints

Specifies the properties to return from the player profile. Defaults to returning the player's display name.

TitleDataKeys
  • string[]

Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetTitleData is false

UserDataKeys
  • string[]

Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetUserData is false

UserReadOnlyDataKeys
  • string[]

Specific keys to search for in the custom data. Leave null to get all keys. Has no effect if GetUserReadOnlyData is false

PlayerProfileViewConstraints

Name Type Description
ShowAvatarUrl
  • boolean

Whether to show player's avatar URL. Defaults to false

ShowBannedUntil
  • boolean

Whether to show the banned until time. Defaults to false

ShowCampaignAttributions
  • boolean

Whether to show campaign attributions. Defaults to false

ShowContactEmailAddresses
  • boolean

Whether to show contact email addresses. Defaults to false

ShowCreated
  • boolean

Whether to show the created date. Defaults to false

ShowDisplayName
  • boolean

Whether to show the display name. Defaults to false

ShowExperimentVariants
  • boolean

Whether to show player's experiment variants. Defaults to false

ShowLastLogin
  • boolean

Whether to show the last login time. Defaults to false

ShowLinkedAccounts
  • boolean

Whether to show the linked accounts. Defaults to false

ShowLocations
  • boolean

Whether to show player's locations. Defaults to false

ShowMemberships
  • boolean

Whether to show player's membership information. Defaults to false

ShowOrigination
  • boolean

Whether to show origination. Defaults to false

ShowPushNotificationRegistrations
  • boolean

Whether to show push notification registrations. Defaults to false

ShowStatistics
  • boolean

Reserved for future development

ShowTags
  • boolean

Whether to show tags. Defaults to false

ShowTotalValueToDateInUsd
  • boolean

Whether to show the total value to date in usd. Defaults to false

ShowValuesToDate
  • boolean

Whether to show the values to date. Defaults to false

RegisterPlayFabUserRequest

Name Type Description
CustomTags
  • object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

DisplayName
  • string

An optional parameter for setting the display name for this title (3-25 characters).

Email
  • string

User email address attached to their account

EncryptedRequest
  • string

Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only).

InfoRequestParameters

Flags for which pieces of info to return for the user.

Password
  • string

Password for the PlayFab account (6-100 characters)

PlayerSecret
  • string

Player secret that is used to verify API request signatures (Enterprise Only).

RequireBothUsernameAndEmail
  • boolean

An optional parameter that specifies whether both the username and email parameters are required. If true, both parameters are required; if false, the user must supply either the username or email parameter. The default value is true.

TitleId
  • string

Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected.

Username
  • string

PlayFab username for the account (3-20 characters)

RegisterPlayFabUserResult

Each account must have a unique email address in the PlayFab service. Once created, the account may be associated with additional accounts (Steam, Facebook, Game Center, etc.), allowing for added social network lists and achievements systems.

Name Type Description
EntityToken

If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and returned.

PlayFabId
  • string

PlayFab unique identifier for this newly created account.

SessionTicket
  • string

Unique token identifying the user and game at the server level, for the current session.

SettingsForUser

Settings specific to this user.

Username
  • string

PlayFab unique user name.

UserSettings

Name Type Description
GatherDeviceInfo
  • boolean

Boolean for whether this player is eligible for gathering device info.

GatherFocusInfo
  • boolean

Boolean for whether this player should report OnFocus play-time tracking.

NeedsAttribution
  • boolean

Boolean for whether this player is eligible for ad tracking.

Error Codes

Name Code
EmailAddressNotAvailable 1006
EncryptionKeyMissing 1290
InvalidEmailAddress 1005
InvalidPartnerResponse 1193
InvalidPassword 1008
InvalidUsername 1007
NameNotAvailable 1058
ProfaneDisplayName 1234
UsernameNotAvailable 1009