Execute Cloud Script
Executes a CloudScript function, with the ‘currentPlayerId’ set to the PlayFab ID of the authenticated player. The PlayFab ID is the entity ID of the player’s master_player_account entity.
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| CloudScriptAPIRequestCountExceeded | 1209 |
| CloudScriptAPIRequestError | 1210 |
| CloudScriptFunctionArgumentSizeExceeded | 1208 |
| CloudScriptHTTPRequestError | 1211 |
| CloudScriptNotFound | 1136 |
| JavascriptException | 1099 |
| ProductDisabledForTitle | 1609 |
| TitleDeleted | 1347 |
Authorizations
This API requires a title secret key, available to title admins, from PlayFab Game Manager.
Body
The name of the CloudScript function to execute
The unique user identifier for the player on whose behalf the script is being run
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
Object that is passed in to the function as the first argument
Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager.
Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'.
Live, Latest, Specific The specivic revision to execute, when RevisionSelection is set to 'Specific'
