Skip to main content

Implement login with device ID

Last updated on July 15, 2024


The simplest authentication method for AccelByte Gaming Services (AGS) is login via a Device ID, which is a unique string for device identification. Device ID can refer to a computer's serial number, the International Mobile Equipment Identity (IMEI) of a mobile device, or another unique identifier. You can use Device ID for testing and as an easy way for players to log in to mobile games without an account.

When players use Device ID, they can log in to your game without entering any registration or credentials. When a player logs in for the first time, the system creates an account automatically, allowing access to different services such as Matchmaking, Friend management, or Store.


Use login with Device ID for development only. This authentication method is made to test integration with our services.


Follow this tutorial to implement Login via Device ID in your game.

Configure a login method in the Admin Portal

AGS supports many login methods; choose which login methods you want to activate.

  1. To activate the Device ID login method, open your Admin Portal dashboard and select your game namespace.

  2. On the Admin Portal sidebar, select Game Setup > 3rd Party Configuration > Auth & Account Linking.

  3. On the Login Methods page, click on the + Add New button. The system directs you to a new menu that displays all of AGS's login methods.

  4. From the list of login method options, select the Device to add the Device ID login method. The system displays a pop-up window where you configure the login method.

    Add Device ID login method

  5. You only need to fill in the Redirect URI, which redirects the player once account authorization succeeds. The default URI is Once done, click Create.

    Create login method

    A new menu appears that displays your configuration settings and status, which should be Active. If the menu doesn't appear, click Activate to select the Device ID login method.

    Configuration settings

You have now configured and activated the Device ID login method in the Admin Portal. Next, implement Login with Device ID in your game project.

Implement Login into your game

Implement Login with Device ID in your game with this sample code.

IOnlineSubsystem* Subsystem = IOnlineSubsystem::Get(ACCELBYTE_SUBSYSTEM);
ensure(Subsystem != nullptr);

FOnlineIdentityAccelBytePtr IdentityInterface = nullptr;
ensure(FOnlineIdentityAccelByte::GetFromSubsystem(Subsystem, IdentityInterface));

int32 LocalUserNum = 0;
FOnlineAccountCredentialsAccelByte Credentials{ EAccelByteLoginType::DeviceId, TEXT(""), TEXT("") };
// Login
, FOnLoginCompleteDelegate::CreateLambda([](int32 LocalUserNum, bool bLoginWasSuccessful, const FUniqueNetId& UserId, const FString& LoginError)
if (bLoginWasSuccessful)
// Do something when player successfully logged in
// Do something when player failed to log in
IdentityInterface->Login(LocalUserNum, Credentials);

Congratulations! You logged into the AGS platform and can unlock the full potential of AGS.