Skip to main content
This guide shows you how to integrate the PlayFab Unified SDK into your Windows project, initialize the SDK, and authenticate a player. This is the foundation for making PlayFab API calls.

Prerequisites

Before you begin, complete the setup steps in Quickstart Setup to configure your development environment and project.

What you’ll accomplish

By the end of this quickstart, you’ll have:
  • Set up the PlayFab Unified SDK in your Windows project
  • Initialized the SDK with your Title ID
  • Authenticated a player using XBOX or Steam
  • Obtained an entity handle for making API calls
  • Properly cleaned up resources

In this quickstart

  1. Initialize the SDK
  2. Authenticate a Player
  3. Clean up resources

Step 1: Initialize the SDK

Include required headers

Start by including the necessary PlayFab and XBOX Game Runtime headers in your project:

Initialize XBOX Gaming Runtime Services

The PlayFab Unified SDK requires XBOX Game Runtime. Initialize it first:

Initialize PlayFab Core

Initialize the PlayFab SDK and create a service configuration handle. Replace ABCDEF with your actual PlayFab Title ID:
You can find your Title ID in the Game Manager dashboard under your game’s settings.

Step 2: Authenticate a Player

PlayFab requires player authentication before making API calls. The SDK provides several authentication methods depending on your platform and requirements.

Choose your authentication method

Use PFAuthenticationLoginWithXUserAsync to log in with an XBOX user account. This is the recommended method for Windows and XBOX applications.

Option B: Login with Steam

For Steam-integrated games, use PFAuthenticationLoginWithSteamAsync with a Steam authentication ticket.
The PFEntityHandle returned from login is required for all subsequent PlayFab API calls. Keep this handle available throughout your application’s lifetime.

Step 3: Clean up resources

When your application shuts down, properly clean up all resources to prevent memory leaks and ensure graceful termination:
Always clean up resources in the reverse order of initialization to ensure proper shutdown.

Next steps

Now that you’ve initialized the SDK and authenticated a player, you’re ready to start calling PlayFab services:

Make your first API call

Core concepts

Advanced authentication

  • Multi-platform authentication - Support multiple authentication providers
  • Custom ID authentication - Use your own authentication system
  • Account linking - Link multiple authentication methods to one account

Troubleshooting

Common issues and solutions:

Reference documentation

Last modified on August 20, 2026