Documentation

SetProfileLanguage

Updates the entity's language. The precedence hierarchy for communication to the player is Title Player Account language, Master Player Account language, and then title default language if the first two aren't set or supported.

Request Details

Given an entity profile, will update its language to the one passed in if the profile's version is at least the one passed in.

SetProfileLanguageRequest
Request Properties
Entity EntityKey

The entity to perform this action on.

ExpectedVersion (required) int32

The expected version of a profile to perform this update on

Language String

The language to set on the given entity. Deletes the profile's language if passed in a null string.

POST https://{{TitleID}}.playfabapi.com/Profile/SetProfileLanguage
    Content-Type: application/json
{
  "Language": "en",
  "ExpectedVersion": 123,
  "Entity": {
    "Id": "1234",
    "Type": "title_player_account",
    "TypeString": "title_player_account"
  }
}
        

Response Details

SetProfileLanguageResponse
Result Properties
OperationResult OperationTypes

The type of operation that occured on the profile's language

VersionNumber int32

The updated version of the profile after the language update

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "VersionNumber": 124,
    "OperationResult": "Updated"
  }
}

Authentication

EntityToken

Possible Error Codes

Name Code
InvalidParams 1000
NotAuthenticated 1074
NotAuthorized 1089
ProfileDoesNotExist 1298