Documentation

PlayFab Client API Categories

APIs which provide the full range of PlayFab features available to the client - authentication, account and data management, inventory, friends, matchmaking, reporting, and platform-specific functionality

Authentication

  • GetPhotonAuthenticationToken

    Gets a Photon custom authentication token that can be used to securely join the player into a Photon room. See https://api.playfab.com/docs/using-photon-with-playfab/ for more details.

  • GetWindowsHelloChallenge

    Requests a challenge from the server to be signed by Windows Hello Passport service to authenticate.

  • LoginWithAndroidDeviceID

    Signs the user in using the Android device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user

  • LoginWithCustomID

    Signs the user in using a custom unique identifier generated by the title, returning a session identifier that can subsequently be used for API calls which require an authenticated user

  • LoginWithEmailAddress

    Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. Unlike most other login API calls, LoginWithEmailAddress does not permit the creation of new accounts via the CreateAccountFlag. Email addresses may be used to create accounts via RegisterPlayFabUser.

  • LoginWithFacebook

    Signs the user in using a Facebook access token, returning a session identifier that can subsequently be used for API calls which require an authenticated user

  • LoginWithGameCenter

    Signs the user in using an iOS Game Center player identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user

  • LoginWithGoogleAccount

    Signs the user in using their Google account credentials

  • LoginWithIOSDeviceID

    Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently be used for API calls which require an authenticated user

  • LoginWithKongregate

    Signs the user in using a Kongregate player account.

  • LoginWithPlayFab

    Signs the user into the PlayFab account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. Unlike most other login API calls, LoginWithPlayFab does not permit the creation of new accounts via the CreateAccountFlag. Username/Password credentials may be used to create accounts via RegisterPlayFabUser, or added to existing accounts using AddUsernamePassword.

  • LoginWithSteam

    Signs the user in using a Steam authentication ticket, returning a session identifier that can subsequently be used for API calls which require an authenticated user

  • LoginWithTwitch

    Signs the user in using a Twitch access token.

  • LoginWithWindowsHello

    Completes the Windows Hello login flow by returning the signed value of the challange from GetWindowsHelloChallenge. Windows Hello has a 2 step client to server authentication scheme. Step one is to request from the server a challenge string. Step two is to request the user sign the string via Windows Hello and then send the signed value back to the server.

  • RegisterPlayFabUser

    Registers a new Playfab user account, returning a session identifier that can subsequently be used for API calls which require an authenticated user. You must supply either a username or an email address.

  • RegisterWithWindowsHello

    Registers a new PlayFab user account using Windows Hello authentication, returning a session ticket that can subsequently be used for API calls which require an authenticated user

Account Management

  • AddGenericID

    Adds the specified generic service identifier to the player's PlayFab account. This is designed to allow for a PlayFab ID lookup of any arbitrary service identifier a title wants to add. This identifier should never be used as authentication credentials, as the intent is that it is easily accessible by other players.

  • AddUsernamePassword

    Adds playfab username/password auth to an existing account created via an anonymous auth method, e.g. automatic device ID login.

  • GetAccountInfo

    Retrieves the user's PlayFab account details

  • GetPlayerCombinedInfo

    Retrieves all of the user's different kinds of info.

  • GetPlayerProfile

    Retrieves the player's profile

  • GetPlayFabIDsFromFacebookIDs

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

  • GetPlayFabIDsFromGameCenterIDs

    Retrieves the unique PlayFab identifiers for the given set of Game Center identifiers (referenced in the Game Center Programming Guide as the Player Identifier).

  • GetPlayFabIDsFromGenericIDs

    Retrieves the unique PlayFab identifiers for the given set of generic service identifiers. A generic identifier is the service name plus the service-specific ID for the player, as specified by the title when the generic identifier was added to the player account.

  • GetPlayFabIDsFromGoogleIDs

    Retrieves the unique PlayFab identifiers for the given set of Google identifiers. The Google identifiers are the IDs for the user accounts, available as "id" in the Google+ People API calls.

  • GetPlayFabIDsFromKongregateIDs

    Retrieves the unique PlayFab identifiers for the given set of Kongregate identifiers. The Kongregate identifiers are the IDs for the user accounts, available as "user_id" from the Kongregate API methods(ex: http://developers.kongregate.com/docs/client/getUserId).

  • 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.

  • GetPlayFabIDsFromTwitchIDs

    Retrieves the unique PlayFab identifiers for the given set of Twitch identifiers. The Twitch identifiers are the IDs for the user accounts, available as "_id" from the Twitch API methods (ex: https://github.com/justintv/Twitch-API/blob/master/v3_resources/users.md#get-usersuser).

  • LinkAndroidDeviceID

    Links the Android device identifier to the user's PlayFab account

  • LinkCustomID

    Links the custom identifier, generated by the title, to the user's PlayFab account

  • LinkFacebookAccount

    Links the Facebook account associated with the provided Facebook access token to the user's PlayFab account

  • LinkGameCenterAccount

    Links the Game Center account associated with the provided Game Center ID to the user's PlayFab account

  • LinkGoogleAccount

    Links the currently signed-in user account to their Google account, using their Google account credentials

  • LinkIOSDeviceID

    Links the vendor-specific iOS device identifier to the user's PlayFab account

  • LinkKongregate

    Links the Kongregate identifier to the user's PlayFab account

  • LinkSteamAccount

    Links the Steam account associated with the provided Steam authentication ticket to the user's PlayFab account

  • LinkTwitch

    Links the Twitch account associated with the token to the user's PlayFab account.

  • LinkWindowsHello

    Link Windows Hello authentication to the current PlayFab Account

  • RemoveGenericID

    Removes the specified generic service identifier from the player's PlayFab account.

  • ReportPlayer

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

  • SendAccountRecoveryEmail

    Forces an email to be sent to the registered email address for the user's account, with a link allowing the user to change the password

  • UnlinkAndroidDeviceID

    Unlinks the related Android device identifier from the user's PlayFab account

  • UnlinkCustomID

    Unlinks the related custom identifier from the user's PlayFab account

  • UnlinkFacebookAccount

    Unlinks the related Facebook account from the user's PlayFab account

  • UnlinkGameCenterAccount

    Unlinks the related Game Center account from the user's PlayFab account

  • UnlinkGoogleAccount

    Unlinks the related Google account from the user's PlayFab account (https://developers.google.com/android/reference/com/google/android/gms/auth/GoogleAuthUtil#public-methods).

  • UnlinkIOSDeviceID

    Unlinks the related iOS device identifier from the user's PlayFab account

  • UnlinkKongregate

    Unlinks the related Kongregate identifier from the user's PlayFab account

  • UnlinkSteamAccount

    Unlinks the related Steam account from the user's PlayFab account

  • UnlinkTwitch

    Unlinks the related Twitch account from the user's PlayFab account.

  • UnlinkWindowsHello

    Unlink Windows Hello authentication from the current PlayFab Account

  • UpdateAvatarUrl

    Update the avatar URL of the player

  • UpdateUserTitleDisplayName

    Updates the title specific display name for the user

Player Data Management

  • GetFriendLeaderboard

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

  • GetFriendLeaderboardAroundPlayer

    Retrieves a list of ranked friends of the current player for the given statistic, centered on the requested PlayFab user. If PlayFabId is empty or null will return currently logged in user.

  • GetLeaderboard

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

  • GetLeaderboardAroundPlayer

    Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or null will return currently logged in user.

  • GetPlayerStatistics

    Retrieves the indicated statistics (current version and values for all statistics, if none are specified), 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

  • GetUserPublisherData

    Retrieves the publisher-specific custom data for the user which is readable and writable 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. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.

  • UpdateUserData

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

  • UpdateUserPublisherData

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

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

  • GetStoreItems

    Retrieves the set of items defined for the specified store, including all prices defined

  • GetTime

    Retrieves the current server time

  • GetTitleData

    Retrieves the key-value store of custom title settings

  • GetTitleNews

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

Player Item Management

  • AddUserVirtualCurrency

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

  • ConfirmPurchase

    Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual currency balances as appropriate

  • ConsumeItem

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

  • GetCharacterInventory

    Retrieves the specified character's current inventory of virtual goods

  • GetPurchase

    Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that are still active.

  • GetUserInventory

    Retrieves the user's current inventory of virtual goods

  • PayForPurchase

    Selects a payment option for purchase order created via StartPurchase

  • PurchaseItem

    Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed.

  • 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.

  • StartPurchase

    Creates an order for a list of items from the title catalog

  • SubtractUserVirtualCurrency

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

  • UnlockContainerInstance

    Opens the specified container, with the specified key (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 target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an 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.

Friend List Management

  • AddFriend

    Adds the PlayFab user, based upon a match against a supplied unique identifier, to the friend list of the local user. At least one of FriendPlayFabId,FriendUsername,FriendEmail, or FriendTitleDisplayName should be initialized.

  • GetFriendsList

    Retrieves the current friend list for the local user, 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 a specified user from the friend list of the local user

  • SetFriendTags

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

Matchmaking

  • GetCurrentGames

    Get details about all current running game servers matching the given parameters.

  • GetGameServerRegions

    Get details about the regions hosting game servers matching the given parameters.

  • Matchmake

    Attempts to locate a game session matching the given parameters. If the goal is to match the player into a specific active session, only the LobbyId is required. Otherwise, the BuildVersion, GameMode, and Region are all required parameters. Note that parameters specified in the search are required (they are not weighting factors). If a slot is found in a server instance matching the parameters, the slot will be assigned to that player, removing it from the availabe set. In that case, the information on the game session will be returned, otherwise the Status returned will be GameNotFound. Note that EnableQueue is deprecated at this time.

  • StartGame

    Start a new game server with a given configuration, add the current player and return the connection information.

Analytics

Shared Group Data

  • AddSharedGroupMembers

    Adds users to the set of those able to update both the shared data, as well as the set of users in the group. Only users in the group can add new members.

  • CreateSharedGroup

    Requests the creation of a shared group object, containing key/value pairs which may be updated by all members of the group. Upon creation, the current user will be the only member of the group.

  • GetSharedGroupData

    Retrieves data stored in a shared group object, as well as the list of members in the group. Non-members of the group may use this to retrieve group data, including membership, but they will not receive data for keys marked as private.

  • RemoveSharedGroupMembers

    Removes users from the set of those able to update the shared data and the set of users in the group. Only users in the group can remove members. If as a result of the call, zero users remain with access, the group and its associated data will be deleted.

  • UpdateSharedGroupData

    Adds, updates, and removes data keys for a shared group object. If the permission is set to Public, all fields updated or added in this call will be readable by users not in the group. By default, data permissions are set to Private. Regardless of the permission setting, only members of the group can update the data.

Server-Side Cloud Script

  • ExecuteCloudScript

    Executes a CloudScript function, with the 'currentPlayerId' set to the PlayFab ID of the authenticated player.

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.

Characters

  • 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 user

  • GetLeaderboardAroundCharacter

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

  • 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. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.

Character Data

  • GetCharacterData

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

  • GetCharacterReadOnlyData

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

  • UpdateCharacterData

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

Trading

  • AcceptTrade

    Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted items will be swapped between the two players' inventories.

  • CancelTrade

    Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other players from accepting them, for trades that can be claimed by more than one player).

  • GetPlayerTrades

    Gets all trades the player has either opened or accepted, optionally filtered by trade status.

  • GetTradeStatus

    Gets the current status of an existing trade.

  • OpenTrade

    Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time.

Advertising

PlayStream

  • GetPlayerSegments

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

  • GetPlayerTags

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

Platform Specific Methods