Documentation

PlayFab Server API

Provides functionality to allow external (developer-controlled) servers to interact with user inventories and data in a trusted manner, and to handle matchmaking and client connection orchestration

Account Management

  • BanUsers

    Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.

  • GetPlayerProfile

    Retrieves the player's profile

  • GetPlayFabIDsFromFacebookIDs

    Retrieves the unique PlayFab identifiers for the given set of Facebook identifiers.

  • GetPlayFabIDsFromSteamIDs

    Retrieves the unique PlayFab identifiers for the given set of Steam identifiers. The Steam identifiers are the profile IDs for the user accounts, available as SteamId in the Steamworks Community API calls.

  • GetUserAccountInfo

    Retrieves the relevant details for a specified user

  • GetUserBans

    Gets all bans for a user.

  • RevokeAllBansForUser

    Revoke all active bans for a user.

  • RevokeBans

    Revoke all active bans specified with BanId.

  • SendCustomAccountRecoveryEmail

    Forces an email to be sent to the registered contact email address for the user's account based on an account recovery email template

  • SendEmailFromTemplate

    Sends an email based on an email template to a player's contact email

  • SendPushNotification

    Sends an iOS/Android Push Notification to a specific user, if that user's device has been configured for Push Notifications in PlayFab. If a user has linked both Android and iOS devices, both will be notified.

  • UpdateAvatarUrl

    Update the avatar URL of the specified player

  • UpdateBans

    Updates information of a list of existing bans specified with Ban Ids.

Analytics

Authentication

  • AuthenticateSessionTicket

    Validated a client's session ticket, and if successful, returns details for that user

  • SetPlayerSecret

    Sets the player's secret if it is not already set. Player secrets are used to sign API requests. To reset a player's secret use the Admin or Server API method SetPlayerSecret.

Character Data

  • GetCharacterData

    Retrieves the title-specific custom data for the user which is readable and writable by the client

  • GetCharacterInternalData

    Retrieves the title-specific custom data for the user's character which cannot be accessed by the client

  • GetCharacterReadOnlyData

    Retrieves the title-specific custom data for the user's character which can only be read by the client

  • UpdateCharacterData

    Updates the title-specific custom data for the user's character which is readable and writable by the client

  • UpdateCharacterInternalData

    Updates the title-specific custom data for the user's character which cannot be accessed by the client

  • UpdateCharacterReadOnlyData

    Updates the title-specific custom data for the user's character which can only be read by the client

Characters

  • DeleteCharacterFromUser

    Deletes the specific character ID from the specified user.

  • GetAllUsersCharacters

    Lists all of the characters that belong to a specific user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness.

  • GetCharacterLeaderboard

    Retrieves a list of ranked characters for the given statistic, starting from the indicated point in the leaderboard

  • GetCharacterStatistics

    Retrieves the details of all title-specific statistics for the specific character

  • GetLeaderboardAroundCharacter

    Retrieves a list of ranked characters for the given statistic, centered on the requested user

  • GetLeaderboardForUserCharacters

    Retrieves a list of all of the user's characters for the given statistic.

  • GrantCharacterToUser

    Grants the specified character type to the user. CharacterIds are not globally unique; characterId must be evaluated with the parent PlayFabId to guarantee uniqueness.

  • UpdateCharacterStatistics

    Updates the values of the specified title-specific statistics for the specific character

Content

  • GetContentDownloadUrl

    This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP GET to the returned URL will attempt to download the content. A HEAD query to the returned URL will attempt to retrieve the metadata of the content. Note that a successful result does not guarantee the existence of this content - if it has not been uploaded, the query to retrieve the data will fail. See this post for more information: https://community.playfab.com/hc/en-us/community/posts/205469488-How-to-upload-files-to-PlayFab-s-Content-Service. Also, please be aware that the Content service is specifically PlayFab's CDN offering, for which standard CDN rates apply.

Friend List Management

  • AddFriend

    Adds the Friend user to the friendlist of the user with PlayFabId. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized.

  • GetFriendsList

    Retrieves the current friends for the user with PlayFabId, constrained to users who have PlayFab accounts. Friends from linked accounts (Facebook, Steam) are also included. You may optionally exclude some linked services' friends.

  • RemoveFriend

    Removes the specified friend from the the user's friend list

  • SetFriendTags

    Updates the tag list for a specified user in the friend list of another user

Matchmaking

Platform Specific Methods

Player Data Management

  • DeleteUsers

    Deletes the users for the provided game. Deletes custom data, all account linkages, and statistics.

  • GetFriendLeaderboard

    Retrieves a list of ranked friends of the given player for the given statistic, starting from the indicated point in the leaderboard

  • GetLeaderboard

    Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard

  • GetLeaderboardAroundUser

    Retrieves a list of ranked users for the given statistic, centered on the currently signed-in user

  • GetPlayerCombinedInfo

    Returns whatever info is requested in the response for the user. Note that PII (like email address, facebook id) may be returned. All parameters default to false.

  • GetPlayerStatistics

    Retrieves the current version and values for the indicated statistics, for the local player.

  • GetPlayerStatisticVersions

    Retrieves the information on the available versions of the specified statistic.

  • GetUserData

    Retrieves the title-specific custom data for the user which is readable and writable by the client

  • GetUserInternalData

    Retrieves the title-specific custom data for the user which cannot be accessed by the client

  • GetUserPublisherData

    Retrieves the publisher-specific custom data for the user which is readable and writable by the client

  • GetUserPublisherInternalData

    Retrieves the publisher-specific custom data for the user which cannot be accessed by the client

  • GetUserPublisherReadOnlyData

    Retrieves the publisher-specific custom data for the user which can only be read by the client

  • GetUserReadOnlyData

    Retrieves the title-specific custom data for the user which can only be read by the client

  • UpdatePlayerStatistics

    Updates the values of the specified title-specific statistics for the user

  • UpdateUserData

    Updates the title-specific custom data for the user which is readable and writable by the client

  • UpdateUserInternalData

    Updates the title-specific custom data for the user which cannot be accessed by the client

  • UpdateUserPublisherData

    Updates the publisher-specific custom data for the user which is readable and writable by the client

  • UpdateUserPublisherInternalData

    Updates the publisher-specific custom data for the user which cannot be accessed by the client

  • UpdateUserPublisherReadOnlyData

    Updates the publisher-specific custom data for the user which can only be read by the client

  • UpdateUserReadOnlyData

    Updates the title-specific custom data for the user which can only be read by the client

Player Item Management

  • AddCharacterVirtualCurrency

    Increments the character's balance of the specified virtual currency by the stated amount

  • AddUserVirtualCurrency

    Increments the user's balance of the specified virtual currency by the stated amount

  • ConsumeItem

    Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's inventory.

  • EvaluateRandomResultTable

    Returns the result of an evaluation of a Random Result Table - the ItemId from the game Catalog which would have been added to the player inventory, if the Random Result Table were added via a Bundle or a call to UnlockContainer.

  • GetCharacterInventory

    Retrieves the specified character's current inventory of virtual goods

  • GetRandomResultTables

    Retrieves the configuration information for the specified random results tables for the title, including all ItemId values and weights

  • GetUserInventory

    Retrieves the specified user's current inventory of virtual goods

  • GrantItemsToCharacter

    Adds the specified items to the specified character's inventory

  • GrantItemsToUser

    Adds the specified items to the specified user's inventory

  • GrantItemsToUsers

    Adds the specified items to the specified user inventories

  • ModifyItemUses

    Modifies the number of remaining uses of a player's inventory item

  • MoveItemToCharacterFromCharacter

    Moves an item from a character's inventory into another of the users's character's inventory.

  • MoveItemToCharacterFromUser

    Moves an item from a user's inventory into their character's inventory.

  • MoveItemToUserFromCharacter

    Moves an item from a character's inventory into the owning user's inventory.

  • RedeemCoupon

    Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the Economy->Catalogs tab in the PlayFab Game Manager.

  • ReportPlayer

    Submit a report about a player (due to bad bahavior, etc.) on behalf of another player, so that customer service representatives for the title can take action concerning potentially toxic players.

  • RevokeInventoryItem

    Revokes access to an item in a user's inventory

  • SubtractCharacterVirtualCurrency

    Decrements the character's balance of the specified virtual currency by the stated amount. It is possible to make a VC balance negative with this API.

  • SubtractUserVirtualCurrency

    Decrements the user's balance of the specified virtual currency by the stated amount. It is possible to make a VC balance negative with this API.

  • UnlockContainerInstance

    Opens a specific container (ContainerItemInstanceId), with a specific key (KeyItemInstanceId, when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem.

  • UnlockContainerItem

    Searches Player or Character inventory for any ItemInstance matching the given CatalogItemId, if necessary unlocks it using any appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem.

  • UpdateUserInventoryItemCustomData

    Updates the key-value pair data tagged to the specified item, which is read-only from the client.

PlayStream

  • AddPlayerTag

    Adds a given tag to a player profile. The tag's namespace is automatically generated based on the source of the tag.

  • GetAllSegments

    Retrieves an array of player segment definitions. Results from this can be used in subsequent API calls such as GetPlayersInSegment which requires a Segment ID. While segment names can change the ID for that segment will not change.

  • GetPlayerSegments

    List all segments that a player currently belongs to at this moment in time.

  • GetPlayersInSegment

    Allows for paging through all players in a given segment. This API creates a snapshot of all player profiles that match the segment definition at the time of its creation and lives through the Total Seconds to Live, refreshing its life span on each subsequent use of the Continuation Token. Profiles that change during the course of paging will not be reflected in the results. AB Test segments are currently not supported by this operation.

  • GetPlayerTags

    Get all tags with a given Namespace (optional) from a player profile.

  • RemovePlayerTag

    Remove a given tag from a player profile. The tag's namespace is automatically generated based on the source of the tag.

Server-Side Cloud Script

  • ExecuteCloudScript

    Executes a CloudScript function, with the 'currentPlayerId' variable set to the specified PlayFabId parameter value.

Shared Group Data

Title-Wide Data Management

  • GetCatalogItems

    Retrieves the specified version of the title's catalog of virtual goods, including all defined properties

  • GetPublisherData

    Retrieves the key-value store of custom publisher settings

  • GetTime

    Retrieves the current server time

  • GetTitleData

    Retrieves the key-value store of custom title settings

  • GetTitleInternalData

    Retrieves the key-value store of custom internal title settings

  • GetTitleNews

    Retrieves the title news feed, as configured in the developer portal

  • SetPublisherData

    Updates the key-value store of custom publisher settings

  • SetTitleData

    Updates the key-value store of custom title settings

  • SetTitleInternalData

    Updates the key-value store of custom title settings