Hi there,
I am trying to add a friend via cloud script. Unfortunately I get an error which i tried to solve, unsuccessfully :-(
I receive the following:
"Logs": [ { "Level": "Error", "Message": "PlayFab API request error", "Data": { "api": "/Server/AddFriend", "request": { "FriendsListPlayFabId": "E1C24F9E75861970", "PlayFabId": "957122DB610D6A8E" }, "result": null, "apiError": { "code": 400, "status": "BadRequest", "error": "InvalidParams", "errorCode": 1000, "errorMessage": "Invalid input parameters", "errorHash": null, "errorDetails": null } } And my cloud script looks like: handlers.AddFriend = function(args){ var friendlist={}; friendlist.FriendsListPlayFabId = currentPlayerId; friendlist.PlayFabId = args.Idd; server.AddFriend(friendlist); } In my C# code, I have the following: private void BtnCloudFriend_Click(object sender, RoutedEventArgs e) { AddFriendCloud("957122DB610D6A8E"); } public static async void AddFriendCloud(string FabId) { await StartCloudFriend("957122DB610D6A8E").ContinueWith(executeCloudScriptResult => OnCloudHelloWorld(executeCloudScriptResult.Result.Result)); } private static async Task<PlayFabResult<ExecuteCloudScriptResult>> StartCloudFriend(string a) { var executeCloudScriptRequest = new ExecuteCloudScriptRequest() { FunctionName = "AddFriend", FunctionParameter = new { Idd = a }, GeneratePlayStreamEvent = true, }; return await PlayFabClientAPI.ExecuteCloudScriptAsync(executeCloudScriptRequest); } Well, as I am completely new to cloud script, I really cannot find out what's happening and why there is the error message. Any help would be appreciated. Best wishes and many thanks in advance, Michael