---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.0
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/construct-3/authorization-and-data.md
  - https://yandex.com/dev/games/doc/hi/sdk/construct-3/authorization-and-data.md
  - https://yandex.com/dev/games/doc/ko/sdk/construct-3/authorization-and-data.md
  - https://yandex.com/dev/games/doc/ru/sdk/construct-3/authorization-and-data.md
  - https://yandex.com/dev/games/doc/tr/sdk/construct-3/authorization-and-data.md
  - https://yandex.com/dev/games/doc/vi/sdk/construct-3/authorization-and-data.md
  - https://yandex.com/dev/games/doc/zh/sdk/construct-3/authorization-and-data.md
  - href: https://yandex.com/dev/games/doc/en/sdk/construct-3/authorization-and-data.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com/dev/games/doc/en/llms.txt?revision=r21993288
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/en/llms.txt?revision=r21993288

# Authorization and player data

<!-- source: en/_includes/script-common.md -->
<!-- source: en/_includes/script/index-js.md -->

<!-- endsource: en/_includes/script/index-js.md -->

<!-- source: en/_includes/script/requirements-js.md -->

<!-- endsource: en/_includes/script/requirements-js.md -->

<!-- source: en/_includes/script/image-modal-js.md -->

<!-- endsource: en/_includes/script/image-modal-js.md -->
<!-- endsource: en/_includes/script-common.md -->

<!-- source: en/_includes/sdk/common-with-plugins.md -->
You can:

- Save game data (completed levels, experience, in-app purchases, etc.) on the Yandex server using SDK methods or transfer it to your own server. Cloud saves allow users to continue playing on different devices.
- Personalize the game using data from the user's Yandex profile, such as their name.
<!-- endsource: en/_includes/sdk/common-with-plugins.md -->

## Player information {#player-info}

To start working with player data, use the **Fetch player info** action together with the trigger conditions **Player info is successfully fetched** and **Failure to fetch player info**.

To get player data use:

- **Player is authorized** condition: Checks if the player is authorized in Yandex.
- **Player personal info access granted** condition: Checks if the player's personal data has been obtained.
- **Player signature** expression: A `string` containing user data from the Yandex profile and a signature. Consists of two strings encoded in `Base64` format.
- **Player avatar** expression: A `string`, link to the player's avatar.
- **Player name** expression: A `string`, the player's name.
- **Player paying status** expression: A `string`, the user's payment activity status on the platform.
- **Player unique id** expression: A `string`, the player's unique identifier.

![Screenshot of Construct 3: the screen for setting up user data using the YandexGamesSDK plugin. A table with three columns (each cell in the third column has the buttons "+ Add action" and "+ Add...") and 4 rows. Row 1 — "System", "Run once", "Yan… | Request player information. Personal data: False". Row 2 — "YandexGames…", "Player info loaded", the last cell is empty. Row 3 — "YandexGames…", "Player granted access to personal data", the settings icon "Sys... | Set username to YandexGamesSDK.Player name". Row 4 — "YandexGames…", "Error loading player info", the settings icon "Sys... | Set username to "Anonymous user"".](../../_images/construct-3/authorization-and-data/fetch-player-info.webp)

## In-game data {#ingame-data}

To work with the user's in-game data, use the actions:

- **Get player data** — requests the user's in-game data and writes it to a JSON object.
- **Set player data** — sends the user's in-game data from a JSON object to Yandex Games.
- **Get player stats** — requests the user's numerical data and writes it to a JSON object.
- **Set player stats** — sends the user's numerical data from a JSON object to Yandex Games.
- **Increment player stats** — increases the user's numerical data by the specified value.

![Screenshot of Construct 3: the screen for setting up user data using the YandexGamesSDK plugin. Green label "Global number GameProgress = 0". Below is a table with three columns and two rows. Row 1 — "Function Load game", "YandexGamesSDK" and in the next two rows the settings icon "System"", "Get player data from keys "" and save to ( PlayerDataJSON., ", "Wait for previous actions to complete", "Set GameProgress to int(PlayerDataJSON.Get("levelprogress"))". Row 2 — "Function Save game", "PlayerDataJSON, YandexGamesSDK", "Set key "levelprogress" to GameProgress, Save player data using) PlayerDataJSON. Flush: True."](../../_images/construct-3/authorization-and-data/player-data.webp)

{% note warning %}

All these actions are asynchronous, and their execution takes some time. To avoid errors, use the action **Wait for previous actions**.

{% endnote %}

---


<!-- source: en/_includes/sdk/button-git.md -->
<a href="https://github.com/yandex-games-plugins/construct3">
  <span class="button">Repository</span>
</a>
<!-- endsource: en/_includes/sdk/button-git.md -->
