I want to access player file using cloudscript, i was read playfab document and follow this link PlayFab then I know playfab have a func call GetFile(), how to use this with playfab cloudscript, help me please !! thanks all
I want to access player file using cloudscript, i was read playfab document and follow this link PlayFab then I know playfab have a func call GetFile(), how to use this with playfab cloudscript, help me please !! thanks all
GetFiles API is an entity related API as it requires X-EntityToken in the http header. To use those APIs in the Cloud Script, you need to call ExecuteEntityCloudScript in your client instead of ExecuteCloudScript. Then in the cloud script, you can use it via:
handlers.getfileTest = function (args, context) { var entityProfile = context.currentEntity; var getFileRequest = { Entity : entityProfile.Entity }; var result = entity.GetFiles(getFileRequest); log.info( result.Metadata); }
2 People are following this question.