# User Parameters

You can also retrieve various information about the player and their device.

#### Device Type

Determine the type of device (mobile, tablet, desktop, tv) the game is being played on to adjust the game’s interface and performance settings.

```javascript
PlaygamaBridge::DeviceType()
```

Returns the type of device the user launched the game from. Possible values: `mobile`, `tablet`, `desktop`, `tv`

#### Is Player Authorization Supported

Check if the platform supports player authorization to enable features that require user authentication, such as saving game progress or accessing social features. Possible values: `true`, `false`.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FizijJ1eaE7o7RfeQ1wdd%2FScreenshot%202025-01-21%20at%2013.30.51.png?alt=media&#x26;token=08e7c79b-3858-4cf8-b7dd-9432c04cdd79" alt=""><figcaption></figcaption></figure>

#### Is Player Authorized

Verify if the player is currently authorized on the platform. This allows you to enable personalized features, such as saving high scores or providing user-specific content. Possible values: `true`, `false`.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FHmrglGM19jblOgq7v109%2FScreenshot%202025-01-21%20at%2016.01.48.png?alt=media&#x26;token=2ff1bd22-6854-457d-af57-560e6e388e62" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If the player is not authorized, you can still check the player's ID and name, there may be a guest account in use.
{% endhint %}

#### Player ID

Get the player’s unique ID on the platform to manage user-specific data and settings. Use this ID to track player progress, achievements, and purchases.

```javascript
PlaygamaBridge::PlayerId()
```

If the platform supports authorization and the player is currently authorized, this returns their platform player ID. Otherwise, it returns `null`.

#### Player Name

Retrieve the player's name to personalize the game experience. Display the name in leaderboards, friend lists, or when sending notifications and messages. If there is no data – `null`. If the data is available, the data is in `string` format.

```javascript
PlaygamaBridge::PlayerName()
```

#### Player Extra Fields  <a href="#player-authorization" id="player-authorization"></a>

Get platform-specific information (properties may vary depending on the platform).

```javascript
PlaygamaBridge::PlayerExtraPropertyCount()
```

```javascript
PlaygamaBridge::PlayerExtraPropertyName(<extra_prop_index>)
```

```javascript
PlaygamaBridge::PlayerExtraPropertyValue("<extra_prop>")
```

Use this data to verify authorization. Currently, the Playgama API verification only supports `playgama`, `msn` and `microsoft_store` platforms.

```bash
curl -X POST "https://playgama.com/api/bridge/v1/verify" \
  -H "Content-Type: application/json" \
  -d '{"platform":"<PLATFORM_ID>","type":"authorization","data":{  <...Extra Props> }}'
  
#  Response:
#  {
#    success: boolean;
#    errorMessage?: string;

#    -- authorization --
#    playerId?: string;
#    publisherPlayerId?: string;
#  }
```

#### Number of Player Avatars

Get the count of player avatars available. Use this to manage and display user profile images effectively, such as showing the avatar in multiplayer lobbies or profile screens.

```javascript
PlaygamaBridge::PlayerPhotosCount()
```

#### Get Avatar by Index

Retrieve a specific player avatar by its index to display user profile images in different resolutions. This can be useful for showing high-resolution avatars in profile views and lower-resolution ones in friend lists.

```javascript
PlaygamaBridge::PlayerPhoto(<Number>)
```

#### Player Authorization

Authorize the player on the platform to access protected features and personalize the game experience. For example, prompting the player to log in to save their progress or unlock social sharing features.

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FSH1TT9Iag5b4dhEH51Kq%2FScreenshot%202025-09-05%20at%2011.01.16.png?alt=media&#x26;token=f153031f-f4c0-47b3-ad20-7b32097930c7" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"000kind":"GDEVELOP_EventsAndInstructions_CLIPBOARD_KIND-jsBdHbLy912y8Rc","content":{"eventsList":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PanelSpriteButton::PanelSpriteButton::IsClicked"},"parameters":["Button",""]}],"actions":[{"type":{"value":"PlaygamaBridge::AuthorizePlayer"},"parameters":["",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::OnAuthorizePlayerCompleted"},"parameters":["",""]}],"actions":[],"events":[{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"value":"PlaygamaBridge::IsLastActionCompletedSuccessfully"},"parameters":["",""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"success\"","\"info\"",""]}]},{"type":"BuiltinCommonInstructions::Standard","conditions":[{"type":{"inverted":true,"value":"PlaygamaBridge::IsLastActionCompletedSuccessfully"},"parameters":["",""]}],"actions":[{"type":{"value":"DebuggerTools::ConsoleLog"},"parameters":["\"error\"","\"info\"",""]}]}]}],"eventsCount":2,"actionsList":[],"actionsCount":0,"conditionsList":[],"conditionsCount":0}}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.playgama.com/playgama/sdk/engines/gdevelop/user-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
