Account Management - Add Username Password

Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device ID login.

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

Request Header

Name Required Type Description
X-Authorization True
  • string

This API requires a client session ticket, available from any Client Login function.

Request Body

Name Required Type Description
Email True
  • string

User email address attached to their account

Password True
  • string

Password for the PlayFab account (6-100 characters)

Username True
  • string

PlayFab username for the account (3-20 characters)

CustomTags
  • object

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

Responses

Name Type Description
200 OK

Each account must have a unique username and 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. This can also be used to provide a recovery method if the user loses their original means of access.

400 Bad Request

This is the outer wrapper for all responses with errors

Security

X-Authorization

This API requires a client session ticket, available from any Client Login function.

Type: apiKey
In: header

Definitions

AddUsernamePasswordRequest
AddUsernamePasswordResult

Each account must have a unique username and 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. This can also be used to provide a recovery method if the user loses their original means of access.

ApiErrorWrapper

The basic wrapper around every failed API response

AddUsernamePasswordRequest

Name Type Description
CustomTags
  • object

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

Email
  • string

User email address attached to their account

Password
  • string

Password for the PlayFab account (6-100 characters)

Username
  • string

PlayFab username for the account (3-20 characters)

AddUsernamePasswordResult

Each account must have a unique username and 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. This can also be used to provide a recovery method if the user loses their original means of access.

Name Type Description
Username
  • string

PlayFab unique user name.

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

Error Codes

Name Code
AccountAlreadyLinked 1011
EmailAddressNotAvailable 1006
InvalidEmailAddress 1005
InvalidPassword 1008
InvalidUsername 1007
UsernameNotAvailable 1009