I guess I found the answer, I mistakenly tick marked above condition in API Features. which demanded me to put correct json in Data.
Sorry for the trouble.
And thankyou for your time and help.
@Mahnoor Naeem oh that didn't came into my mind.
That's great that now your problem is resolved :)
And sure no problem. Have a great day!
Can you post your code and the exact error you're getting?
this is the code
PlayFabServerAPI.UpdateUserReadOnlyData(
new PlayFab.ServerModels.UpdateUserDataRequest { PlayFabId = agentID, Data = new Dictionary<string, string>() { {"MyPlayers", "mahnoor"}, },
Permission = PlayFab.ServerModels.UserDataPermission.Public },
result => { Debug.Log("Data Updated"); },
error => {
Debug.Log( error.ErrorMessage);
} ) ;
This is the error I get:
Invalid input parameters UnityEngine.Debug:Log(Object)
But if I replace "mahnoor" with some numbers like "236438" then data will be updated.
@Mahnoor Naeem Can you please post the playfab error code?
The value for key MyPlayers was not valid JSON.
this is the error I got from error detail
I dont know the error code, but http code is 400.
These errors are given by your code above.
As far as I tested it, it only accepts numbers in string.Because even in your code when I entered "1234556" as value, it got updated. as below.
@Mahnoor Naeem
Let me check this and get back to you. To me it's very strange.
The same code is working for me. Can you please share your own code so I could test it on my end and see if it's working
@Mahnoor Naeem
I used your own code mentioned in the first comment and it's working for me.
I am attaching a screenshot too and I tried to enter two values "123456" & "mahnoor" both can be seen in the picture that they are inserted successfully
I used same code as you posted. Mine is also posted above that.
I have used your code and it's working See the above comment
3 People are following this question.
How do I define players who has some set of attributes and can be added to a squad?
GetPlayerCombinedInfoResult returns null TitleData,PlayerProfile.
Cloudscript update player data only for not existing keys
Create Title Data for specific Segment.
KeyNotFoundException: The given key was not present in the dictionary.