# 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%2FzzQhwcPsT1U2ZyYu55b8%2FScreenshot%202024-10-17%20at%206.04.05%E2%80%AFPM.png?alt=media&#x26;token=a8943b8e-0584-4b75-8bcb-7df96a3de28c" 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%2F3wez0mJMSUqeBBLSLSDx%2FScreenshot%202024-10-17%20at%206.05.08%E2%80%AFPM.png?alt=media&#x26;token=493754d7-3d5f-491f-8356-3591188571fd" 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 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":{  <...ExtraProps> }}'
  
#  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(index)
```

#### 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%2FXy63icns9EqcAUHuitox%2FScreenshot%202025-09-05%20at%2010.56.14.png?alt=media&#x26;token=63c80f27-2a28-4b32-aa10-b2bd8ad3360e" alt=""><figcaption></figcaption></figure>

<details>

<summary>Copy This Example</summary>

```
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[{"id":"authorize-player","objectClass":"PlaygamaBridge"}]},{"eventType":"block","conditions":[{"id":"on-authorize-player-completed","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"is-last-action-completed-successfully","objectClass":"PlaygamaBridge"}],"actions":[{"type":"comment","text":"success"}]},{"eventType":"block","conditions":[{"id":"is-last-action-completed-successfully","objectClass":"PlaygamaBridge","isInverted":true}],"actions":[{"type":"comment","text":"error"}]}]}]}
```

</details>
