I have a game that I launched on Test Flight and Google Play Beta Release for 3 months now. The game is using Cloud Scripts in some functions related to Shop and Edit Profile, everything was working fine but suddenly anything that uses the cloud scripts stopped working WITHOUT any interfering in the code from the developers. It only outputs this error: " /CloudScript/ExecuteFunction: NotAuthorized"
Here is a sample from our code that produces this error
private static void ExecuteFunction(object body, string functionName,
Action<ExecuteFunctionResult> resultCallBack, Action<PlayFabError> errorCallBack,
bool generatePlayStreamEvent = true)
{
PlayFabCloudScriptAPI.ExecuteFunction(new ExecuteFunctionRequest
{
FunctionName = functionName,
FunctionParameter = body,
GeneratePlayStreamEvent = generatePlayStreamEvent
}, Success, Failure);
void Success(ExecuteFunctionResult response)
{
Debug.Log($"Func {functionName} Success, Result: {response.FunctionResult} -- Execution Time: {response.ExecutionTimeMilliseconds}");
resultCallBack?.Invoke(response);
}
void Failure(PlayFabError error)
{
Debug.LogError(error.GenerateErrorReport());
errorCallBack?.Invoke(error);
}
}