rima avatar image
rima asked

With Unreal GetServerAPI()->ExecuteCloudScript

We are implementing Execute Cloud Script on our Dedicated Server.

We have setup Developer Secret Key and the Title Id:


And then Upon Execute Cloud Script , It Requires a Player PlayFabId which prevent us from Executing Server Side Cloud Script. I've Tried Leaving it Empty but the API Returns Invalid Input , PlayFabId is Required.

IPlayFabModuleInterface::Get().GetServerAPI()->SetDevSecretKey(TEXT("OurDevKey"));<br><br>PlayFab::ServerModels::FExecuteCloudScriptServerRequest AcceptSessionRequest;

AcceptSessionRequest.FunctionName = TEXT("acceptSession");
AcceptSessionRequest.FunctionParameter.readFromValue(MakeShareable(new FJsonValueObject(JsonParam)));
AcceptSessionRequest.RevisionSelection = PlayFab::ServerModels::CloudScriptRevisionOption::CloudScriptRevisionOptionLatest;
bool bWasRequestSent = IPlayFabModuleInterface::Get().GetServerAPI()->ExecuteCloudScript(
PlayFab::UPlayFabServerAPI::FExecuteCloudScriptDelegate::CreateUObject(this, &UOnlineTaskAcceptSession::ReceivedAcceptSessionSuccess),
PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &UOnlineTaskAcceptSession::ReceivedError)

Looking at the Documentation , PlayFabId is Required for Server Side Execute Cloud Script. How does this Apply to Limitation. In Our Case Dedicated Servers Will invoke a Cloud Script once they are Launched so we don't have a Player List yet. Is it recommended to use a Dummy Player Id , if So what are the Limits?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Citrus Yan avatar image
Citrus Yan answered

The Server/ExecuteCloudScript API was intended to run actions on any players you specify, therefore PlayFabId is required. There is no “hard” limit applied regarding this, however in your case, I would suggest that you use CloudScript/ExecuteEntityCloudScript instead, which requires no PlayFabId, executes as the title itself, and makes more sense.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rima avatar image rima commented ·

My Apologies as i didn't see the Answer earlier.

Thanks for your detailed answer.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.