question

duartedd avatar image
duartedd asked

executecloudscript try it button - pass playfabid

Hello I tried using a function (called findduel in my script - received a javascript error so i went to the try it now at

https://api.playfab.com/documentation/CloudScript/method/ExecuteEntityCloudScript

it just kept on spinning - when i execute it through the unity client - i dont have to pass PlayFabId and i just have currentPlayerId in the cloud script function

I am guessing there is some conversion that is done somewhere to translate to the currentPlayerId but how would i pass that in the try it so that i can replicate the call ? In the meanwhile ill swap over to postman and try that out but figured itd save me from loading postman

C1D2 is the Title ID if it is needed.

thank you

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

·
JayZuo avatar image
JayZuo answered

Could you specify what you mean "it just kept on spinning"? You may try to clear cache and cookies before testing. And while testing with "TRY IT" button, there is also no need to pass PlayFabId. What you must provide is the "Title ID" and "FunctionName" like

Others are optional. And when you click CALL API, it will first try to log in with a custom Id and then execute your API call.

Finally, you will get a result like the following:

{
 "code": 200,
 "status": "OK",
 "data": {
  "FunctionName": "helloWorld",
  "Revision": 15,
  "FunctionResult": {
   "messageValue": "Hello C785F3CDA2966DA6!"
  },
  "Logs": [
   {
    "Level": "Info",
    "Message": "Hello C785F3CDA2966DA6!"
   },
   {
    "Level": "Debug",
    "Message": "helloWorld:",
    "Data": {
     "input": null
    }
   }
  ],
  "ExecutionTimeSeconds": 0.0012458,
  "ProcessorTimeSeconds": 0,
  "MemoryConsumedBytes": 19632,
  "APIRequestsIssued": 0,
  "HttpRequestsIssued": 0
 },
 "CallBackTimeMS": 584
}

With the "TRY IT" button, there is no way to pass/specify the player account, it will always use the automatically generated custom Id to log in. If you want to test against specify player, I'd suggest you try with Postman.


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.

duartedd avatar image duartedd commented ·

okay thanks JayZuo - postman it is and works for me. It just kept on saying please wait while it runs the call but it was most likely because it used the playfabid calls ( there are 5 or 6 server api calls within that execute cloud script call too but - postman was able to work for me splendidly - now that i know I cant use the try it ill just continue using postman - thank you again!

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.