Guides
Player Profiles
Learn how to fetch, utilize, and render player information inside your HTML5 games using the Boofer SDK.
Fetching Player Data
Use the Boofer.getPlayerInfo() method to retrieve details about the currently logged-in player.
const player = await Boofer.getPlayerInfo();
console.log("Player Handle:", player.displayName);
console.log("Player Level:", player.level);Profile Fields Reference
| Field | Type | Description |
|---|---|---|
| userId | string | Unique player identifier. |
| displayName | string | The player's username or nickname. |
| avatarUrl | string | Public URI to the user's profile image. |
| level | number | The player's global Boofer level. |
| highScore | number | The player's personal high score for the game. |