GetUserDataRequest getData = new GetUserDataRequest(); getData.PlayFabId = player.playfabID; List<string> keys = new List<string>(); keys.Add("Engine"); keys.Add("Chassis"); keys.Add("Body"); keys.Add("Wheel"); getData.Keys = keys; PlayFabServerAPI.GetUserData(getData, (result) => { Debug.Log("Engine: " + result.Data ["Engine"].Value); Debug.Log("Base: " + result.Data ["Base"].Value); Debug.Log("Chassis: " + result.Data ["Chassis"].Value); Debug.Log("Wheel: " + result.Data ["Wheel"].Value); }, (error) => { Debug.Log(error); });
I'm trying to "mimic" a server inside of Unity to build the project.
When I'm trying to retrive the data from a player, it gives me the error:
PlayFabError(NotAuthenticated, Missing or invalid X-SecretKey HTTP header, 401 Unauthorized)
I'm not sure where to set the Secret Key as I thought the Editor Extension already did that for me.
Any help would be great, thanks!