EDIT: Resolved because I put the URL as /PFUpdateUserData by accident instead of /UpdateUserData -- gah.. I copied the name of my function name. Anyway, still good template below.
Looking at this:
OST https://{
{TitleID}}.playfabapi.com/Client/UpdateUserData
Content-Type: application/json;
X-Authentication: <user_session_ticket_value>{
"Data": {
"Class": "Fighter",
"Gender": "Female",
"Icon": "Guard 3",
"Theme": "Colorful"
},
"Permission": "Public"
}
I'm struggling getting errors everywhere using AJAX. Registration worked fine, but now that I need to x-auth, I can't find the right way to do this!
I'm trying this:
var json =
{
"Data":
{
"PlayerFirstName": FirstName,
"PlayerLastName": LastName
//"PlayerGender": Gender,
},
"Permission": "Public"
};
...
type: "POST",
url: url,
data: JSON.stringify(json),
contentType: 'application/json;charset=utf-8',
dataType: 'json',
timeout: 5000,
headers:
{
'X-authentication' : SessionTicket // Definitely a valid one
},
cache: false,
success: function (data)
{ ...