Prerequisites
Before you begin, ensure you have:- Completed the core SDK setup and authentication
- An authenticated
PFEntityHandlefrom the login process - Your PlayFab Title ID and service configuration set up
This guide assumes you’ve already initialized the PlayFab SDK and authenticated a player following the core quickstart guide. If you haven’t done so, please complete that guide first.
What you’ll accomplish
By the end of this quickstart, you’ll have:- Retrieved the entity key for an authenticated player
- Made your first PlayFab service API call
- Processed the response from a PlayFab service
Making your first service API call
After successful authentication, you can make PlayFab API calls using thePFEntityHandle obtained during login. This example shows how to retrieve files stored for the current player.
Step 1: Get the Entity Key
First, retrieve the entity key from your authenticated entity handle:Step 2: Call the GetFiles API
Now make your first PlayFab service call to get files associated with the player:Understanding the API call pattern
All PlayFab service API calls follow a similar pattern:- Prepare the request - Create and populate a request structure
- Initiate the async call - Call the
*Asyncfunction - Wait for completion - Use
XAsyncGetStatusto wait for the operation - Get result size - Call
*GetResultSizeto determine buffer needs - Retrieve the result - Call
*GetResultto get the actual data
Next steps
Now that you’ve successfully called a PlayFab service, explore these additional features:Common service APIs
- Player Data Management - Store and retrieve custom player data
- Player Statistics - Track player stats and achievements
- Title Data - Access game configuration data
- Cloud Script - Execute server-side logic
Advanced features
- Leaderboards - Implement competitive features with rankings
- Economy and Monetization - Add virtual currencies and items
- Multiplayer - Integrate matchmaking and lobby services
- Analytics - Track player behavior and game metrics
Best practices
- Asynchronous operations - Understanding PlayFab’s async programming model
- Memory management - Best practices for managing SDK memory
- Tracing and diagnostics - Debugging and monitoring your integration
Troubleshooting
Common issues and solutions:
For more detailed error information, enable tracing and diagnostics in your application.
