Hi there,
I defined cloudscript for SendAccountRecoveryEmail. I ran and failed.
handlers.reqSendAccountRecoveryEmail = function (args, context) { var accountInfo = server.GetUserAccountInfo({ PlayFabId: currentPlayerId }) log.debug({"accountInfo": accountInfo}); var request = { Email: accountInfo.UserInfo.PrivateInfo.Email }; var response = server.SendAccountRecoveryEmail(request); log.debug("response", {response: response}); return { responseContent: response }; };
Following is the log
{ "FunctionResult": null, "Logs": [ { "Level": "Debug", "Message": "...", "Data": null } ], "ExecutionTimeSeconds": 0.0500327, "MemoryConsumedBytes": 13472, "APIRequestsIssued": 1, "HttpRequestsIssued": 0, "Error": { "Error": "JavascriptException", "Message": "JavascriptException", "StackTrace": "TypeError: server.SendAccountRecoveryEmail is not a function\n at handlers.reqSendAccountRecoveryEmail (4D6D5-main.js:45:27)\n at Object.invokeFunction (Script:116:33)" } }
I have no idea why this fails.
Did I miss something?
,Hi there,
I defined cloudscript and tried to call SendAccountRecoveryEmail in automation.
handlers.reqSendAccountRecoveryEmail = function (args, context) { var accountInfo = server.GetUserAccountInfo({ PlayFabId: currentPlayerId }) log.debug({"accountInfo": accountInfo}); var request = { Email: accountInfo.UserInfo.PrivateInfo.Email }; var response = server.SendAccountRecoveryEmail(request); log.debug("response", {response: response}); return { responseContent: response }; };
It fails and I have no idea why this fails. Following is the error log.
"ExecutionTimeSeconds": 0.0500327, "MemoryConsumedBytes": 13472, "APIRequestsIssued": 1, "HttpRequestsIssued": 0, "Error": { "Error": "JavascriptException", "Message": "JavascriptException", "StackTrace": "TypeError: server.SendAccountRecoveryEmail is not a function\n at handlers.reqSendAccountRecoveryEmail (4D6D5-main.js:45:27)\n at Object.invokeFunction (Script:116:33)" }
Is there anything I missed?