Skip to main content

Xbox Series X|S and WinGDK

note

For the WinGDK platform, only Xbox account login is supported. The login and authentication methods are the same as those for XSX, and the configuration steps are also consistent.

This document introduces how to set up Xbox Series X|S authentication, allowing your game to use Player Network's login authentication service to sign in via the Xbox Series X|S channel.

note

Development for Xbox Series X|S is generally not aimed at individual developers. You need to contact Microsoft through your company's business contacts to enable Xbox Series X|S development permissions.

Prerequisites

  1. Register a Xbox Game Dev account and refer to the steps in the official Microsoft Learn documentation to set up your game.
  2. Obtain a Player Network Console login account.
  3. Create a new project for your game, or join an existing one.
  4. Download SDK.
5. Integrate SDK

Please refer to the relevant documentation to integrate the SDK for your game.

For Player Network SDK V1.23.00 ~ V1.24.00, you also need to add the following content:

  1. Go to the engine source code: Engine\Platforms\XSX\Source\Programs\UnrealBuildTool\UEBuildXSX.cs
  2. Add the following two system libraries in the SetUpEnvironment() method.
    LinkEnvironment.SystemLibraries.Add("advapi32.lib");
    LinkEnvironment.SystemLibraries.Add("oldnames.lib");
  3. Recompile UnrealBuildTools
  1. Add Xbox Series X|S as a login authentication method in Player Network Console.

Step 1: Add Xbox Series X|S Login

note

Xbox 平台推荐开发者采用 PXUID(Partner Xbox User ID)作为玩家账号体系的核心标识符。

PXUID is a next-generation user identification system designed specifically for modern cross-platform games and applications. Compared to the traditional xuid, it provides better privacy protection, improved cross-platform compatibility, and stronger long-term stability.
This choice ensures your application or game remains compatible with the evolving Xbox ecosystem while providing players with a safer and seamless cross-platform experience.

Configure the INTL_XSX_PR_URL field in the INTLConfig.ini file.

INTL_XSX_PR_URL = https://demo.intlgame.com // Domain name to configure for PXUID authentication login on the XSX platform
  1. Register login-related callbacks.
// Add callbacks
public void AddAuthObserver()
{
INTLAPI.AddAuthResultObserver(OnAuthResultEvent);
}

// Remove callbacks
public void RemoveAuthObserver()
{
INTLAPI.RemoveAuthResultObserver(OnAuthResultEvent);
}

// Process the INTLAuthResult callback
public void OnAuthResultEvent(INTLAuthResult ret)
{
Debug.Log($"MethodID: {ret.MethodId}");

string methodTag = "";
if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_LOGIN)
{
methodTag = "Login";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_BIND)
{
methodTag = "Bind";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_AUTOLOGIN)
{
methodTag = "AutoLogin";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_QUERY_USER_INFO)
{
methodTag = "QueryUserInfo";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_GET_AUTH_RESULT)
{
methodTag = "GetAuthResult";
}
}
  1. Call the AutoLogin interface to log in automatically.
INTLAPI.AutoLogin();
  1. If automatic login fails, call the Login interface to let the player log in manually.
INTLAPI.Login(INTLChannel.Xbox);
  1. Synchronize client authentication status with the game backend and wait for the final verification result.

Obtain the user ID in the Xbox system

After a successful login, Unity's INTLAuthResult and UE's FINTLAuthResult data structures will provide userId in the ChannelInfo.

"{\"code\":\"v3.xxxx\",\"issuerId\":1,\"userId\":281xxxxxx,\"map_info\":{\"sacc_uid\":\"569xxxxxxxx\",\"sacc_token\":\"3RYxxx==\",\"sacc_account_plat_type\":25},\"access_token\":\"d601xxxx-xxxx-xxxx-xxxx-3b57xxxxxxxx\",\"uid\":\"457xxxxxxxxxxxxxxxx\",\"expire_ts\":163xxxxxxx,\"refresh_token\":\"7470xxxx-xxxx-xxxx-xxxx-e488xxxxxxxx\"}"

Step 2: Accept login functionality

Search for the keyword "AuthResult" in the Player Network SDK logs to confirm whether the channel name and OpenID are returned correctly.If correct, it means the integration configuration is successful, and login functionality has been successfully added.