I'm getting an error when trying to run this code in Unity 2018.3 : The detailed error message says "The value for key test_key was not valid JSON."
PlayFabClientAPI.UpdateUserData(new UpdateUserDataRequest() { Data = new Dictionary<string, string>() { {"key", "value"} }, Permission = UserDataPermission.Public }, result => Debug.Log("Successfully updated user data"), error => { Debug.Log("UpdateUserData error"); });
Answer by Hernando · May 20, 2019 at 08:02 AM
I guess that you have checked this option Require valid JSON for custom data values in [Game manager] -> [Settings] -> [API features]. Please refer this thread for details: https://community.playfab.com/questions/17845/cloudscript-updateuserreadonlydata-error.html
That fixed it, (found the setting in Settings > Api Features)