> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gamavas.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Players

> The player profile your game gets, the Gamavas ID to store, and what changes when players disconnect.

When a player signs in, your game gets their profile. It's the same in every SDK, apart from each engine's naming style:

| Field | What it is |
| - | - |
| `id` | Their **Gamavas ID**. It's stable, it's the same in every game, and it's the one to store |
| `handle` | Their Gamavas handle, for example `ace`. Unique, but players can change it |
| `displayName` | The name they chose on Gamavas |
| `avatarUrl` | Their picture, or null |
| `email` | Only if you asked for it and they agreed; otherwise null |

> [!WARNING]
>
> Use `id` as the key in your own database, not `handle`. Handles can change.

## Asking for email

Pass `email: true` when signing in. Each SDK has its own form: `signIn({ email: true })` on the web, `SignInAsync(askForEmail: true)` in Unity, `sign_in(true)` in Godot. The consent screen asks the player, who can decline. Only ask if your game needs it.

## Level and XP

Every player has a Gamavas level, built from XP they earn across all games: from achievements, from playing well, and more. Read it with the progress call:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "id": "…", "handle": "ace", "xp": 1250, "level": 4, "title": "Adept", "toNextLevel": 250 }
```

Show it in your game. Players like seeing their level follow them around.

## When players disconnect

Players can disconnect your game in their Gamavas settings at any time. Your game's sign-in stops working for them: the next token refresh fails and the SDK reports them signed out. Their purchases and unlocked achievements stay theirs. If they sign in again, they approve your game again.

## Who can sign in

* Anyone with a Gamavas account, once your game's listing is live.
* Only you, while the listing is a draft or in review.
* Nobody, if Gamavas suspends your app. Players keep what they own.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.