Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by Rima · Nov 19, 2020 at 01:57 AM · apisCloudScriptunreal

With Unreal GetServerAPI()->ExecuteCloudScript

We are implementing Execute Cloud Script on our Dedicated Server.

We have setup Developer Secret Key and the Title Id:

IPlayFabModuleInterface::Get().GetServerAPI()->SetTitleId(TEXT("TitleID"));
IPlayFabModuleInterface::Get().GetServerAPI()->SetDevSecretKey(TEXT("OurDevKey"));

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()->SetTitleId(TEXT("TitleID"));
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(
AcceptSessionRequest,
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?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Citrus Yan · Nov 19, 2020 at 08:21 AM

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.

Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rima · Dec 04, 2020 at 07:04 AM 0
Share

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

Thanks for your detailed answer.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    What Causes 503 Errors Saying "Unable to contact server"? 1 Answer

    GetPlayerCombinedInfoRequest no longer includes DisplayName in response 2 Answers

    TypeError when trying to declare a call to server.GetPlayersInSegment(); 1 Answer

    Request timeout 3 Answers

    CloudScript Handler to get player IDs from segment often returns Internal Server Error 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges