Hi,
My question is similar to this one as I want to apply some server logic before setting player's name but can't access this method using the Server API. I tried using the REST API to do so but I get an internal error every time.
Here's my script:
var contentType = "application/json"; var header = JSON.stringify ({ "Content-Type":"application/json", "X-SecretKey":"MY_SECRET_KEY" }); var body = JSON.stringify ({ "DisplayName":"New Name", "PlayFabId":currentPlayerId, }); var response = http.request("https://MYTITLEID.playfabapi.com/Admin/UpdateUserTitleDisplayName", "POST", body, contentType, header);
And the response I get from that http call
{"url":"https://MYTITLEID.playfabapi.com/Admin/UpdateUserTitleDisplayName","method":"POST","content":"{\"DisplayName\":\"New Name\",\"PlayFabId\":\"ID_OF_THE_PLAYER\"}","contentType":"application/json","headers":"{\"Content-Type\":\"application/json\",\"X-SecretKey\":\"MY_SECRET_KEY\"}","result":{"responseContent":null,"httpStatus":null,"httpStatusCode":0,"requestError":"InternalError"},"httpRequestError":"InternalError"}
Is that something we aren't supposed to do and therefore it's not supported?
Any help on that matter would be appreciated. Thanks.
@Brendan maybe?