I have a debug button in my game that I am trying to get to delete the current playfab player and reload the game. I'm calling Server/DeletePlayer from a cloud script and I have enabled player deletion in the game manager. I've tried a bunch of different things but I just keep getting these errrors.
The script made an external HTTP request, which returned an error.
HTTP request error
handlers.DeletePlayfabPlayerForTesting = function (args, context) { var contentType = "application/json"; var header = JSON.stringify ({ "Content-Type":"application/json", "X-SecretKey":"mykey" }); var body = JSON.stringify ({ "PlayFabId":currentPlayerId }); log.debug("body "+ body); log.debug("header "+ header); var response = http.request("https://mytitle.playfabapi.com/Server/DeletePlayer", "POST", body, contentType, header); return { Result: "success" }; };
Is there an obvious error there? Is it possible to delete the player calling the cloudscript?
Thanks