Do you know if Epic Games Store SDK API calls are available as a REST API that we can then call from a Playfab's Cloud Script? We would like, for instance, verify a user authentication token using server-side code.
Do you know if Epic Games Store SDK API calls are available as a REST API that we can then call from a Playfab's Cloud Script? We would like, for instance, verify a user authentication token using server-side code.
CloudScript supports calling REST API via its pre-defined method. Please refer to this section Intermediate Overview: Globals and advanced arguments to check the use of predefined variable http, and you can find the following http.request sample in the first CloudScript revision. You can follow the sample and test calling Epic Games Store SDK API from CloudScript by yourself.
// This is a simple example of making a web request to an external HTTP API. handlers.makeHTTPRequest = function (args, context) { var headers = { "X-MyCustomHeader": "Some Value" }; var body = { input: args, userId: currentPlayerId, mode: "foobar" }; var url = "http://httpbin.org/status/200"; var content = JSON.stringify(body); var httpMethod = "post"; var contentType = "application/json"; // The pre-defined http object makes synchronous HTTP requests var response = http.request(url, httpMethod, content, contentType, headers); return { responseContent: response }; };
Thanks for the quick reply! Yes, I understand that we are able to do that, the question was more in terms of doing it specifically for Epic Games Store, if that was possible/allowed and if someone had experience with it.
@Sarah Zhang I stumbled onto this post through google while trying to figure out how to make a simple API call to epic store. Have been messing about, trying to execute playfab cloud scripts for the last hour myself. Im sorry but can you give any specifics on how exactly can you make the call to Epic Store API itself?
5 People are following this question.
Where should I write cloud script code? ,Where do I actually write cloud script code?
Azure Functions call to PlayFabProfilesAPI.GetProfilesAsync results are always null.
Using Custom Tags with Email verification rule
How can I use the Playfab API while writing a Cloud Script with TypeScript?
Advantages of CloudScript over Calling JavaScript from Node.js