Whenever I tried to call UpdateUserInventoryItemCustomData or GrantItemsToUsers, It always returns an "Invalid input parameters : The value for key [key] is not valid JSON" error.
However, I am sure that my input parameters are valid JSON data. I tried copy and pasting the example data from the API documentation, and they still return the same error.
This problem can be reproduced on Postman and cloud script
Example 1 - UpdateUserInventoryItemCustomData (string value)
Request
POST /Server/UpdateUserInventoryItemCustomData?sdk=PostmanCollection-0.85.190717 HTTP/1.1 Host: E62CC.playfabapi.com X-PlayFabSDK: PostmanCollection-0.85.190717 Content-Type: application/json X-SecretKey: {CENSORED} Cache-Control: no-cache Postman-Token: aa4ff17d-a754-f5d7-174e-b471cf73313e { "PlayFabId": "E9BD228FBFDF111A", "ItemInstanceId": "CE128A3744FE8E7D", "Data": { "Equipped": "True", "Slot": "Head" } }
Response
{ "code": 400, "status": "BadRequest", "error": "InvalidParams", "errorCode": 1000, "errorMessage": "Invalid input parameters", "errorDetails": { "Data": [ "The value for key Equipped was not valid JSON." ] } }
It returns a invalid JSON error.
Example 2 - GrantItemsToUsers
Please take a look.
Thank you!