Skip to main content

How accounts work

Last updated on October 24, 2024

Overview

This guide presents essential information about using AGS accounts, to help ensure your players have trouble-free experiences. Topics include:

  • How to create an AGS account
  • How to link Identity Provider accounts
  • Typical use cases & best practices

Prerequisites

How to get an AGS account

An AGS account provides access to all other AccelByte Gaming Services, such as: user profile, game progression, wallet, entitlements, and more. AGS accounts also enable cross-platform user experiences by linking with multiple identity provider accounts.

Each AGS account can have two different statuses:

Get a headless AGS account

A headless account is the most common type. The system automatically creates one when players sign in to your game for the first time with a custom Device ID or an Identity Provider account like: Playstation, Steam, XBox etc. Once the system creates a headless AGS account, it links it to the corresponding device ID or Identity Provider account.

note

To enable Identity Provider account sign-ins in your game, you need to create the necessary Identity Provider configurations. Read the Authentication section for more details.

Here is a simple overview of the process, starting with a common example.

Headless account creation

Example - part 1

Your game studio has two live games (game_1 & game_2) launched on Steam; both are using the same AGS environment.

As a player, this is my first time signing in to either game (e.g: game_1) on Steam with my Steam account(my_steam_account).

Here is what happens:

  • As this is the first time the player uses this Steam account (my_steam_account) to sign in to either of the games, AGS hasn't linked it to an existing AGS account. The system creates a headless AGS account (my_ags_account) automatically.
  • It includes:
    • A Publisher User ID(publisher_user_id_1) in the Publisher Namespace.
    • A Game User ID (game_user_id_1) in this game Namespace (game_1) that the system links with the Publisher User ID(publisher_user_id_1).
    • This Steam account(my_steam_account) links to this AGS account(my_ags_account) automatically.

Headless example 1

Example - part 2

The player uses the same Steam account(my_steam_account) to sign in to the other game (game_2) for the first time on Steam.

Here is what happens:

  • This Steam account(my_steam_account) links to an AGS account(my_ags_account). The system doesn't create a new AGS account; instead, the player logs in to the game (game_2) directly.
  • The system creates a new Game User ID (game_user_id_2) in the game Namespace (game_2).
  • After that, the player's headless AGS account(my_ags_account) includes:
    • A Publisher User ID (publisher_user_id_1) in the Publisher Namespace.
    • A Game User ID (game_user_id_1) in the Game Namespace(game_1), which the system associates with the Publisher User ID (publisher_user_id_1).
    • Another Game User ID (game_user_id_2) in the Game Namespace(game_2), which the system associates with the Publisher User ID(publisher_user_id_1).
    • A linked Steam account(my_steam_account).

Headless example 2

note

The only way to verify identity and sign in to a headless account is to authenticate the linked identity provider account (or device ID).

Consider prompting players to upgrade their headless account once they start investing in your game. That way, you can build a direct relationship with your players.

Get a full AGS account

A full account is a complete AccelByte account with a verified email address, password, and basic user information.

Players can get a number of benefits from a full account:

  • Use it for account linking with any supported identity provider (such as: Steam, PlayStation, XBox, etc.).
  • Enable the 2FA mechanism for account protection.
  • Manage profiles, request access to their personal data, and more.

There are two ways to get a full account: enable full account registration, and upgrade a headless account to a full one.

note

You can customize the validation of players' username, display name, password, and email with AGS IAM Input Validation.

Enable the traditional full account registration

You can enable the full account registration flow through our Player Portal or SDKs.

Here is a simple overview of the process:

Full account

Full account registration through the Player Portal

Full account registration 1

Full account registration 2

Full account registration 3

note

With our App Editor, you can apply UI and configuration changes to your Player Portal while it's running, eliminating the requirement to rebuild or redeploy.

In-game player registration

This function allows your players to register for an account in your game.

const FString OriginalEmail = TEXT("originalEmail@example.com");
const FString Username = TEXT("JohnDoe");
const FString Password = TEXT("password");
const FString DisplayName = TEXT("testName");
const FString Country = TEXT("US");
const FString DateOfBirth = TEXT("2000-12-20");
bool bUserAccountCreated = false;

FRegistry::User.Registerv2(OriginalEmail, Username, Password, DisplayName, Country, DateOfBirth,
THandler<FUserData>::CreateLambda([&bUserAccountCreated](const FUserData& Result)
{
UE_LOG(LogAccelByteUserTest, Display, TEXT("Success."));
bUserAccountCreated = true;
}),
FErrorHandler::CreateLambda([](int32 ErrorCode, const FString& ErrorMessage)
{
UE_LOG(LogAccelByteUserTest, Error, TEXT("Error. Code: %d, Reason: %s"), ErrorCode, *ErrorMessage)
}));

Upgrade headless account to be a full account

Difference

Lack of a valid email address, username, password, and other necessary information is the only difference between a a headless and a full account. You can also get a full account by upgrading a headless account either through our Player Portal or SDKs.

Here is a simple overview of the process:

Upgrade account

Upgrade a headless account through the Player Portal

Upgrade account 1

Upgrade account 2

In-Game upgrade headless account

This function allows your players to upgrade their headless account in your game.

const FString OriginalEmail = TEXT("originalEmail@example.com");
const FString Password = TEXT("Password1");

FAccountUserData userData;
FRegistry::User.Upgrade(OriginalEmail, Password,
THandler<FAccountUserData>::CreateLambda([&](const FAccountUserData& Result)
{
userData = Result;
UE_LOG(LogAccelByteUserTest, Display, TEXT("Success."));
}),
FErrorHandler::CreateLambda([&](int32 ErrorCode, const FString& ErrorMessage)
{
UE_LOG(LogAccelByteUserTest, Error, TEXT("Error. Code: %d, Reason: %s"), ErrorCode, *ErrorMessage);
}));

//log out
FRegistry::User.ForgetAllCredentials();

Account linking is an essential feature to support cross-platform experiences. It represents the association of one or more identity providers with an AGS account. With a linked Identity Provider account, players can verify their identity and sign in to continue their experience across platforms while keeping their gameplay data intact.

note

Due to Identity Provider platform regulations, there are two primary limitations of account linking:

  • A player can only link one identity provider account to one AGS account.
  • Players can only link one identity provider account per platform to their AGS account. For example, a player can only link one Steam account to their AccelByte account. This rule is true even if players unlink their previous Steam account then attempt to link another one.

Here is a simple overview of the process:

Account linking

Account linking 1

Account linking 2

Account linking 3

Typical use case & best practices

Let's take a look at another typical cross-platform use case.

Example - part 1

As a game studio, I have one live game (game_1) launched on Steam and XBox.

As a player, I start my game_1 journey on the Steam platform first with my Steam account(my_steam_account).

Here is what will happen:

  • The player is using this Steam account (my_steam_account) for the first time to sign in to game_1, which means they haven't linked it to an AGS account yet. The system automatically creates a new headless AGS account (my_ags_account).
  • It includes:
    • A Publisher User ID(publisher_user_id_1) in the Publisher Namespace.
    • A Game User ID (game_user_id_1) in the Game Namespace (game_1), which is associated with the Publisher User ID (publisher_user_id_1).
    • Besides that, the Steam account (my_steam_account) the player used links to their AGS account(my_ags_account) automatically.

Typical example

Example - part 2

The player wants to play game_1 on their XBox console with their XBox account (my_xbox_account) and continue their game progression on Steam on the XBox platform.

Best Practices

Here is our recommended solution in this case:

  • Provide your players a no-friction experience to give your game a first try in any platform (Steam) by using an identity provider account(my_steam_account) which triggers the system to automatically create a headless account (my_ags_account).
  • Once players start investing in your game, prompt them to upgrade their headless account(my_ags_account) to a full one.
  • Before players start the game for the first time on a new platform (XBox), provide players an option to link their game platform account (my_xbox_account) to an existing AccelByte account (my_ags_account), if they have one.
  • Players can continue their game experience on the new platform while keeping their gameplay data intact.

This is what the player has:

Typical example 1

What if...

You may be curious about what happens if the player doesn't link their game platform account to the existing AccelByte account in Step 3 above before they start the game on the new platform.

Example - part 1

A player doesn't link their Xbox account (my_xbox_account) to their existing AGS account (my_ags_account) but chose to start game_1 directly.

This is what happens:

  • As this is the first time the player uses their XBox account (my_xbox_account) to sign in to game_1 on their XBox console, their Xbox account isn't linked to any existing AGS account. The system creates another headless AGS account (my_ags_account_2) automatically.
  • It includes:
    • A Publisher User ID (publisher_user_id_2) in the Publisher Namespace.
    • A Game User ID (game_user_id_2) in this specific Game Namespace (game_1), which links to the Publisher User ID (publisher_user_id_2).
    • The XBox account (my_xbox_account) the player used links to their AGS account (my_ags_account_2).

Typical example 2

Example - part 2

A player realizes that they have to start this game_1 over again on XBox console. This is not what they want; they want to continue the game play they already have on the Steam platform.

Since game progress is stored in an AGS account, in this case, the player needs to link their XBox account (my_xbox_account) to the previous AGS account (my_ags_account) to continue the game play they created on Steam.

In terms of our account linking limitation, one identity provider account can link to one AGS account at a time. The player needs to unlink the XBox account (my_xbox_account) from the current AGS account (my_ags_account_2) first.

Here are the steps players may take in this case:

  • Sign into Player Portal with the new AGS account (my_ags_account_2) and unlink the XBox account (my_xbox_account) from the AGS account first.
  • Log out of the Player Portal and sign in with the previous AGS account (my_ags_account) and link the XBox account (my_xbox_account).
  • That's it. The next time the player launches the game on Steam or XBox, they can share and continue the same game progression in this AGS account (my_ags_account).

Here is what the player has: Typical example 3

note

In the orphaned AGS account (my_ags_account_2), the system keeps everything as normal and doesn't clean anything up. The only thing we need to be aware of is that there is no way for that player to authenticate and sign into the AGS account anymore, unless it links with another third-party platform account or the player promotes it to a full AGS account before unlinking the XBox account.