Loading...
Searching...
No Matches
AccelByte.Api.User Class Reference

User class provides convenient interaction to user authentication and account management service (AccelByte IAM). This user class will manage user credentials to be used to access other services, including refreshing its token. More...

Inheritance diagram for AccelByte.Api.User:

Public Member Functions

void LoginWithUsername (string username, string password, ResultCallback callback, bool rememberMe=false)
 Login to AccelByte account with username (e.g. email) and password.
void LoginWithUsername (string username, string password, ResultCallback< TokenData, OAuthError > callback, bool rememberMe=false)
 Login to AccelByte account with username (e.g. email) and password.
void LoginWithUsernameV3 (string username, string password, ResultCallback callback, bool rememberMe=false)
 Login to AccelByte account with username (or email) and password using V3 endpoint.
void LoginWithUsernameV3 (string username, string password, ResultCallback< TokenData, OAuthError > callback, bool rememberMe=false)
 Login to AccelByte account with username (or email) and password using V3 endpoint.
void LoginWithOtherPlatformId (PlatformType platformType, string platformToken, ResultCallback callback, bool createHeadless=true)
 Login with token from non AccelByte platforms. This will automatically register a user if the user identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithOtherPlatform (PlatformType platformType, string platformToken, ResultCallback< TokenData, OAuthError > callback, bool createHeadless=true, LoginWithMacAddress loginWithMacAddress=null)
 Login with token from non AccelByte platforms. This will automatically register a user if the user identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithOtherPlatform (PlatformType platformType, string platformToken, ResultCallback< TokenData, OAuthError > callback, bool createHeadless, string serviceLabel, LoginWithMacAddress loginWithMacAddress=null)
 Login with token from PS4/PS5 platforms. This will automatically register a user if the user identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.
void ReloginWithOtherPlatform (PlatformType platformType, ResultCallback< TokenData, OAuthError > callback)
void ReloginWithOtherPlatform (string platformId, ResultCallback< TokenData, OAuthError > callback)
void LoginWithOtherPlatformId (string platformId, string platformToken, ResultCallback callback, bool createHeadless=true)
 Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithOtherPlatformId (string platformId, string platformToken, ResultCallback< TokenData, OAuthError > callback, bool createHeadless=true, LoginWithMacAddress loginWithMacAddress=null)
 Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithOtherPlatformId (string platformId, string platformToken, ResultCallback< TokenData, OAuthError > callback, bool createHeadless, string serviceLabel, LoginWithMacAddress loginWithMacAddress=null)
 Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithOtherPlatformV3 (LoginPlatformType loginPlatformType, string platformToken, LoginWithOtherPlatformOptionalParameters optionalParameters, ResultCallback< TokenData, OAuthError > callback)
 Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithLauncher (ResultCallback callback)
 Login With AccelByte Launcher. Use this only if you integrate your game with AccelByte Launcher.
void LoginWithLauncher (ResultCallback< TokenData, OAuthError > callback)
 Login With AccelByte Launcher. Use this only if you integrate your game with AccelByte Launcher.
void LoginWithLauncher (string authCode, ResultCallback< TokenData, OAuthError > callback)
 Login With AccelByte Launcher. Use this only if you integrate your game with AccelByte Launcher.
void LoginWithDeviceId (ResultCallback callback)
 Login with device id. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithDeviceId (ResultCallback< TokenData, OAuthError > callback)
 Login with device id. A user registered with this method is called a headless account because it doesn't have username yet.
void LoginWithLatestRefreshToken (ResultCallback callback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already epired.
void LoginWithLatestRefreshToken (ResultCallback< TokenData, OAuthError > callback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already epired.
void LoginWithLatestRefreshToken (string refreshToken, ResultCallback callback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already expired.
void LoginWithLatestRefreshToken (string refreshToken, ResultCallback< TokenData, OAuthError > callback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already expired.
void LoginWithCachedRefreshToken (string cacheKey, ResultCallback< TokenData, OAuthError > callback)
 Login with refresh token from local cache file.
void RefreshSession (ResultCallback callback)
 Refresh current login session. Will update current token.
void RefreshSession (ResultCallback< TokenData, OAuthError > callback)
 Refresh current login session. Will update current token.
void RefreshSession (string refreshToken, ResultCallback< TokenData, OAuthError > callback)
 Refresh current login session. Will update current token.
void Logout (ResultCallback callback)
 Logout current user session. Access tokens, user ID, and other credentials from memory will be removed.
void Register (string emailAddress, string password, string displayName, string country, DateTime dateOfBirth, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void Register (string emailAddress, string password, string displayName, string country, DateTime dateOfBirth, RegisterUserOptionalParameters optionalParameters, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void Register (string emailAddress, string password, string displayName, string country, DateTime dateOfBirth, string uniqueDisplayName, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void Register (string emailAddress, string password, string displayName, string country, DateTime dateOfBirth, string uniqueDisplayName, RegisterUserOptionalParameters optionalParameters, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void RegisterV2 (string emailAddress, string username, string password, string displayName, string country, DateTime dateOfBirth, string uniqueDisplayName, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void RegisterV2 (string emailAddress, string username, string password, string displayName, string country, DateTime dateOfBirth, string uniqueDisplayName, RegisterUserOptionalParameters optionalParameters, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void Registerv2 (string emailAddress, string username, string password, string displayName, string country, DateTime dateOfBirth, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void Registerv2 (string emailAddress, string username, string password, string displayName, string country, DateTime dateOfBirth, RegisterUserOptionalParameters optionalParameters, ResultCallback< RegisterUserResponse > callback)
 Register a user by giving username, password, and displayName.
void RegisterAndAcceptPolicies (RegisterUserRequestv2 request, ResultCallback< RegisterUserResponse > callback)
 Register a user while optionally accepting legal policies, password, and displayName.
void SendVerificationCodeToNewUser (string emailAddress, SendVerificationCodeToNewUserOptionalParameters optionalParameters, ResultCallback callback)
 Request for verification code to be sent via provided email address.
void GetData (ResultCallback< UserData > callback)
 Get current logged in user data. It will return cached user data if it has been called before.
void GetDataWithLinkedPlatform (ResultCallback< UserData > callback)
 Get current logged in user data with platform data. It will return cached user data if it has been called before.
void GetUserOtherPlatformBasicPublicInfo (string platformId, string[] userIds, ResultCallback< AccountUserPlatformInfosResponse > callback)
 This function will get user basic and public info of 3rd party account.
void RefreshData (ResultCallback< UserData > callback, bool isIncludeAllPlatforms=false)
 Refresh currrent cached user data.
void Update (UpdateUserRequest updateRequest, ResultCallback< UserData > callback)
 Update some user information (e.g. language or country).
void UpdateEmail (UpdateEmailRequest updateEmailRequest, ResultCallback callback)
 Update user email address.
void Upgrade (string userName, string password, ResultCallback< UserData > callback, bool needVerificationCode=false)
 Upgrade a headless account with username and password. User must be logged in before this method can be used.
void Upgrade (string userName, string password, UpgradeHeadlessAccountOptionalParameters optionalParameters, ResultCallback< UserData > callback)
 Upgrade a headless account with username and password. User must be logged in before this method can be used.
void Upgradev2 (string emailAddress, string userName, string password, ResultCallback< UserData > callback)
 Upgrade a headless account with username and password. User must be logged in before this method can be used.
void Upgradev2 (string emailAddress, string password, ResultCallback< UserData > callback)
 Upgrade a headless account with username and password. User must be logged in before this method can be used.
void UpgradeAndVerifyHeadlessAccount (UpgradeAndVerifyHeadlessRequest upgradeAndVerifyHeadlessRequest, ResultCallback< UserData > callback)
 Upgrade a headless account. User must be logged in first then call SendUpgradeVerificationCode code to get verification code send to their email.
void SendUpgradeVerificationCode (string emailAddress, ResultCallback callback)
 Trigger an email that contains verification code to be sent to user's email. User must be logged in with headless account. This function context is "upgradeHeadlessAccount".
void SendVerificationCode (ResultCallback callback)
 Trigger an email that contains verification code to be sent to user's email. User must be logged in. This function context is "UserAccountRegistration". If you want to set your own context, please use the other overload function.
void SendVerificationCode (VerificationContext verificationContext, ResultCallback callback)
 Trigger an email that contains verification code to be sent to user's email. User must be logged in.
void Verify (string verificationCode, ResultCallback callback)
 Verify a user via an email registered as its username. User must be logged in.
void SendResetPasswordCode (string userName, ResultCallback callback)
 Trigger an email that contains reset password code to be sent to user.
void ResetPassword (string resetCode, string userName, string newPassword, ResultCallback callback)
 Reset password for a username.
void LinkOtherPlatform (PlatformType platformType, string platformTicket, ResultCallback callback)
 Link other platform's account to the currently logged in user.
void LinkOtherPlatformId (string platformId, string platformTicket, ResultCallback callback)
 Link other platform's account to the currently logged in user. especially to support OIDC.
void ForcedLinkOtherPlatform (PlatformType platformType, string platformUserId, ResultCallback callback)
 Force to Link other platform's account to the currently logged in user.
void ForcedLinkOtherPlatform (PlatformType platformType, string platformUserId, ForceLinkOtherPlatformOptionalParameters optionalParameters, ResultCallback callback)
 Force to Link other platform's account to the currently logged in user.
void ForcedLinkOtherPlatformId (string platformId, string platformUserId, ResultCallback callback)
 Force to Link other platform's account to the currently logged in user.
void UnlinkOtherPlatform (PlatformType platformType, ResultCallback callback)
 Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login.
void UnlinkOtherPlatformId (string platformId, ResultCallback callback)
 Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login. This function specially to support OIDC.
void UnlinkAllOtherPlatform (PlatformType platformType, ResultCallback callback)
 Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login. Note: Use this API to unlink all the user's current account from their other accounts in other platforms within the game namespace. It resolves issues with the old API by ensuring successful unlinking across multiple namespaces. After calling this API, if a user logs in to any namespace with the same 3rd platform account, they will be logged in as a different account.
void UnlinkAllOtherPlatformId (string PlatformId, ResultCallback callback)
 Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login. This function specially to support OIDC. Note: Use this API to unlink all the user's current account from their other accounts in other platforms within the game namespace. It resolves issues with the old API by ensuring successful unlinking across multiple namespaces. After calling this API, if a user logs in to any namespace with the same 3rd platform account, they will be logged in as a different account.
void GetPlatformLinks (ResultCallback< PagedPlatformLinks > callback)
 Get array of other platforms this user linked to.
void SearchUsers (string query, SearchType searchBy, ResultCallback< PagedPublicUsersInfo > callback, int offset=0, int limit=100, string platformId=null, SearchPlatformType platformBy=SearchPlatformType.None)
 Get user data from another user displayName or username. The query will be used to find the user with the most approximate username or display name.
void SearchUsers (string query, ResultCallback< PagedPublicUsersInfo > callback, int offset=0, int limit=100)
 Get user data from another user by displayName or username. The query will be used to find the user with the most approximate username or display name.
void SearchUsersByOtherPlatformType (string query, PlatformType platformType, SearchPlatformType platformBy, ResultCallback< PagedPublicUsersInfo > callback, int offset=0, int limit=100)
 Get user data from another user by displayName or username with respect to platformType. The query will be used to find the user with the most approximate username or display name.
void SearchUsersByOtherPlatformId (string query, string platformId, SearchPlatformType platformBy, ResultCallback< PagedPublicUsersInfo > callback, int offset=0, int limit=100)
 Searches for users on third-party platforms using their Username or Display Name. This function specifically targets users on platforms and utilizes the platform's DisplayName for the search.
void GetUserPublicInfo (string userId, ResultCallback< GetUserPublicInfoResponse > callback)
 Get public user info by user id.
void GetUserByOtherPlatformUserIdV4 (GetUserPlatformType platformType, string platformUserId, ResultCallback< UserData > callback)
 Get other user data by other platform userId.
void BulkGetUserByOtherPlatformUserIds (PlatformType platformType, string[] otherPlatformUserId, ResultCallback< BulkPlatformUserIdResponse > callback)
 Get other user data by other platform userId(s) (such as SteamID, for example) For Nintendo Platform you need to append Environment ID into the Platorm ID, with this format PlatformID:EnvironmentID. e.g csgas12312323f:dd1.
void BulkGetUserByOtherPlatformUserIds (PlatformType platformType, string[] otherPlatformUserId, BulkGetUserByOtherPlatformUserIdsOptionalParameters optionalParameters, ResultCallback< BulkPlatformUserIdResponse > callback)
 Get other user data by other platform userId(s) (such as SteamID, for example) For Nintendo Platform you need to append Environment ID into the Platorm ID, with this format PlatformID:EnvironmentID. e.g csgas12312323f:dd1.
void GetCountryFromIP (ResultCallback< CountryInfo > callback)
 Get spesific country from user IP.
void GetCountryGroupV3 (ResultCallback< Country[]> callback)
 Get all valid country codes for User Registration.
void GetUserEligibleToPlay (ResultCallback< bool > callback)
 Check if user has purchased the subscription and eligible to play.
void RefreshTokenCallback (Action< string > refreshTokenCallback)
void Verify2FACode (string mfaToken, TwoFAFactorType factor, string code, ResultCallback< TokenData, OAuthError > callback, bool rememberDevice=false)
 Verify 2FA Code.
void VerifyToken (ResultCallback callback)
 OAuth2 token verification API.
void Change2FAFactor (string mfaToken, TwoFAFactorType factor, ResultCallback< TokenData > callback)
 Change 2FA Factor.
void Disable2FAAuthenticator (ResultCallback callback)
 Disable 2FA Authenticator.
void Enable2FAAuthenticator (string code, ResultCallback callback)
 Enable 2FA Authenticator, to enable the backup code 2FA factor, you should also call Enable2FABackupcodes.
void GenerateSecretKeyFor3rdPartyAuthenticateApp (ResultCallback< SecretKey3rdPartyApp > callback)
 Generate Secret Key For 3rd Party Authenticate Application.
void GenerateBackUpCode (ResultCallback< TwoFACode > callback)
 Generate 2FA BackUp Code, will give a new list of new backup code and make codes generated before invalid.
void Disable2FABackupCodes (ResultCallback callback)
 Disable 2FA Backup Codes.
void Enable2FABackupCodes (ResultCallback< TwoFACode > callback)
 Enable 2FA Backup Codes, this should be called if the 2FA not only using authenticator/3rd party factor.
void GetBackUpCode (ResultCallback< TwoFACode > callback)
 Get 2FA BackUp Code.
void GetUserEnabledFactors (ResultCallback< Enable2FAFactors > callback)
 Get User Enabled Factors.
void Make2FAFactorDefault (TwoFAFactorType factor, ResultCallback callback)
 Make 2FA Factor Default.
void GetInputValidations (string languageCode, ResultCallback< InputValidation > callback, bool defaultOnEmpty=true)
 Get IAM Input Validation.
void UpdateUser (UpdateUserRequest updateUserRequest, ResultCallback< UserData > callback)
 Update current user.
void CreateHeadlessAccountAndResponseToken (string linkingToken, bool extendExp, ResultCallback callback)
 Create Headless Account for Account Linking

Parameters
linkingTokenToken for platfrom type
extendExpToken for other platfrom type
callbackReturns Result via callback when completed

.

void CreateHeadlessAccountAndResponseToken (string linkingToken, bool extendExp, ResultCallback< TokenData, OAuthError > callback)
 Create Headless Account for Account Linking.
void AuthenticationWithPlatformLink (string email, string password, string linkingToken, ResultCallback callback)
 Authentication With PlatformLink for Account Linking.
void AuthenticationWithPlatformLink (string email, string password, string linkingToken, ResultCallback< TokenData, OAuthError > callback)
 Authentication With PlatformLink for Account Linking.
void GetUserAvatar (string userId, ResultCallback< Texture2D > callback)
 Request the Avatar of the given UserProfile.
void GetPublisherUser (string userId, ResultCallback< GetPublisherUserResponse > callback)
 Get Publisher User.
void GetUserInformation (string userId, ResultCallback< GetUserInformationResponse > callback)
 Get User Information.
void GenerateOneTimeCode (PlatformType platformId, ResultCallback< GeneratedOneTimeCode > callback)
 Generate one time linking code.
void GenerateOneTimeCode (PlatformType platformId, GenerateOneTimeCodeOptionalParameters optionalParameters, ResultCallback< GeneratedOneTimeCode > callback)
 Generate one time linking code.
void RequestTokenByOneTimeLinkCode (string oneTimeLinkingCode, ResultCallback< TokenData > callback)
 Generate user's token by one time link code. It requires a code which can be generated from GenerateOneTimeCode function.
void RequestTokenByOneTimeLinkCode (string oneTimeLinkingCode, RequestTokenByOneTimeLinkCodeOptionalParameters optionalParameters, ResultCallback< TokenData > callback)
 Generate user's token by one time link code. It requires a code which can be generated from GenerateOneTimeCode function.
void GenerateCodeForPublisherTokenExchange (string publisherClientId, ResultCallback< CodeForTokenExchangeResponse > callback)
 This function generate a code that can be exchanged into publisher namespace token (i.e. by web portal).
void GenerateGameToken (string code, ResultCallback callback)
 Generate publisher user's game token. Required a code from request game token.
void LinkHeadlessAccountToCurrentFullAccount (LinkHeadlessAccountRequest linkHeadlessAccountRequest, ResultCallback callback)
 Link headless account to current full account.
void GetConflictResultWhenLinkHeadlessAccountToFullAccount (string oneTimeLinkCode, ResultCallback< ConflictLinkHeadlessAccountResult > callback)
 Get conflict result when link headless account to current account by one time code.
void CheckUserAccountAvailability (string displayName, ResultCallback callback)
 Check user's account availability using displayName field. If the result is success or no error, it means the account already exists.
void CheckUserAccountAvailability (string valueToCheck, AccountAvailabilityField field, ResultCallback callback)
 Check user's account availability. If the result is success or no error, it means the account already exists.
void GetConfigUniqueDisplayNameEnabled (ResultCallback< bool > callback)
 Get user config value of uniqueDisplayNameEnabled.
void GetConfigUserNameDisabled (ResultCallback< bool > callback)
 Get user config value of userNameDisabled.
void GetPublicSystemConfigValue (ResultCallback< GetPublicSystemConfigValueResponse > callback)
 Get public system config value.
void RetrieveUserThirdPartyPlatformToken (PlatformType platformType, ResultCallback< ThirdPartyPlatformTokenData, OAuthError > callback)
 This function is used for retrieving third party platform token for user that login using third party, if user have not link requested platform in game namespace, will try to retrieving third party platform token from publisher namespace. Passing platform group name or it's member will return same access token that can be used across the platform members. Note: The third party platform and platform group covered for this is: (psn) ps4web, (psn) ps4, (psn) ps5, epicgames, twitch, awscognito.
void ValidateUserInput (ValidateInputRequest request, ResultCallback< ValidateInputResponse > callback)
 Validate user inputs by checking against existing input validation and profanity filter service (if enabled).
void LoginWithEmailV4 (string email, string password, ResultCallback< TokenData, OAuthError > loginCallback)
 Login to AccelByte account with email and password. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithEmailV4 (string email, string password, LoginWithEmailV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Login to AccelByte account with email and password. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithDeviceIdV4 (ResultCallback< TokenData, OAuthError > loginCallback)
 Login with device id. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithDeviceIdV4 (LoginWithDeviceIdV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with device id. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithOtherPlatformV4 (LoginPlatformType loginPlatformType, string platformToken, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithOtherPlatformV4 (LoginPlatformType loginPlatformType, string platformToken, LoginWithOtherPlatformV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithLastRefreshTokenV4 (ResultCallback< TokenData, OAuthError > loginCallback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithLastRefreshTokenV4 (LoginWithRefreshTokenV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithRefreshTokenV4 (string refreshToken, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithRefreshTokenV4 (string refreshToken, LoginWithRefreshTokenV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithCachedRefreshTokenV4 (string cacheKey, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with refresh token from local cache file. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void LoginWithCachedRefreshTokenV4 (string cacheKey, LoginWithRefreshTokenV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Login with refresh token from local cache file. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void CreateHeadlessAccountAndResponseTokenV4 (string linkingToken, bool extendExp, ResultCallback< TokenData, OAuthError > loginCallback)
 Create Headless Account for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void CreateHeadlessAccountAndResponseTokenV4 (string linkingToken, bool extendExp, CreateHeadlessAccountAndResponseTokenV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Create Headless Account for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void AuthenticationWithPlatformLinkAndLoginV4 (string email, string password, string linkingToken, ResultCallback< TokenData, OAuthError > loginCallback)
 Authentication With PlatformLink for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void AuthenticationWithPlatformLinkAndLoginV4 (string email, string password, string linkingToken, AuthenticationWithPlatformLinkAndLoginV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Authentication With PlatformLink for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.
void GenerateGameTokenV4 (string code, ResultCallback< TokenData, OAuthError > loginCallback)
 Generate publisher user's game token. Required a code from request game token.
void GenerateGameTokenV4 (string code, GenerateGameTokenV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Generate publisher user's game token. Required a code from request game token.
void Verify2FACodeV4 (string mfaToken, TwoFAFactorType factor, string code, ResultCallback< TokenData, OAuthError > loginCallback)
 Verify 2FA Code.
void Verify2FACodeV4 (string mfaToken, TwoFAFactorType factor, string code, Verify2FACodeV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)
 Verify 2FA Code.

Public Attributes

readonly OAuth2 oAuth2

Static Public Attributes

const int MaxNumOfBulkGetUserByOtherPlatformUserId = 100

Protected Member Functions

void TriggerLoginResult (Result loginResult, Action< Error > onLoginFailed, Action onLoginSuccess)
void TriggerLoginResult< T, U > (Result< T, U > loginResult, Action< U > onLoginFailed, Action< T > onLoginSuccess)
virtual void TriggerLoginWithCachedRefreshToken (string cacheKey, ResultCallback< TokenData, OAuthError > callback)
virtual void TriggerLogout (ResultCallback callback)
virtual void TriggerGenerateCodeForPublisherTokenExchange (string authToken, string publisherNamespace, string publisherClientId, ResultCallback< CodeForTokenExchangeResponse > callback)
virtual void TriggerLoginWithCachedRefreshTokenV4 (string cacheKey, ResultCallback< TokenDataV4, OAuthError > callback)
virtual void TriggerLoginWithCachedRefreshTokenV4 (string cacheKey, LoginWithRefreshTokenV4OptionalParameters optionalParams, ResultCallback< TokenData, OAuthError > loginCallback)

Properties

UserSession Session [get]
bool TwoFAEnable = false [get]
Properties inherited from AccelByte.Core.WrapperBase
Utils.AccelByteIdValidator IdValidator [get]

Detailed Description

User class provides convenient interaction to user authentication and account management service (AccelByte IAM). This user class will manage user credentials to be used to access other services, including refreshing its token.

This is essentially a gateway to the "User" API; not to be confused with UserSession:ISession (which contains UserId, AuthorizationToken, etc).

Member Function Documentation

◆ AuthenticationWithPlatformLink() [1/2]

void AccelByte.Api.User.AuthenticationWithPlatformLink ( string email,
string password,
string linkingToken,
ResultCallback callback )
inline

Authentication With PlatformLink for Account Linking.

Parameters
emailEmail to login
passwordPassword to login
linkingTokenToken for platfrom type
extendExpToken for other platfrom type
callbackReturns Result via callback when completed

◆ AuthenticationWithPlatformLink() [2/2]

void AccelByte.Api.User.AuthenticationWithPlatformLink ( string email,
string password,
string linkingToken,
ResultCallback< TokenData, OAuthError > callback )
inline

Authentication With PlatformLink for Account Linking.

Parameters
emailEmail to login
passwordPassword to login

///

Parameters
linkingTokenToken for platfrom type
callbackReturns Result via callback when completed

◆ AuthenticationWithPlatformLinkAndLoginV4() [1/2]

void AccelByte.Api.User.AuthenticationWithPlatformLinkAndLoginV4 ( string email,
string password,
string linkingToken,
AuthenticationWithPlatformLinkAndLoginV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Authentication With PlatformLink for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
emailEmail address to login
passwordPassword to login
linkingTokenToken for platfrom type
optionalParamsOptional parameter to modify the function
loginCallbackReturns Result via callback when completed

◆ AuthenticationWithPlatformLinkAndLoginV4() [2/2]

void AccelByte.Api.User.AuthenticationWithPlatformLinkAndLoginV4 ( string email,
string password,
string linkingToken,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Authentication With PlatformLink for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
emailEmail address to login
passwordPassword to login
linkingTokenToken for platfrom type
loginCallbackReturns Result via callback when completed

◆ BulkGetUserByOtherPlatformUserIds() [1/2]

void AccelByte.Api.User.BulkGetUserByOtherPlatformUserIds ( PlatformType platformType,
string[] otherPlatformUserId,
BulkGetUserByOtherPlatformUserIdsOptionalParameters optionalParameters,
ResultCallback< BulkPlatformUserIdResponse > callback )
inline

Get other user data by other platform userId(s) (such as SteamID, for example) For Nintendo Platform you need to append Environment ID into the Platorm ID, with this format PlatformID:EnvironmentID. e.g csgas12312323f:dd1.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
otherPlatformUserIdPlatform UserId that needed to get user data
optionalParametersAdditional parameters of the interface
callbackReturn a Result that contains UserData when completed.

◆ BulkGetUserByOtherPlatformUserIds() [2/2]

void AccelByte.Api.User.BulkGetUserByOtherPlatformUserIds ( PlatformType platformType,
string[] otherPlatformUserId,
ResultCallback< BulkPlatformUserIdResponse > callback )
inline

Get other user data by other platform userId(s) (such as SteamID, for example) For Nintendo Platform you need to append Environment ID into the Platorm ID, with this format PlatformID:EnvironmentID. e.g csgas12312323f:dd1.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
otherPlatformUserIdPlatform UserId that needed to get user data
callbackReturn a Result that contains UserData when completed.

◆ Change2FAFactor()

void AccelByte.Api.User.Change2FAFactor ( string mfaToken,
TwoFAFactorType factor,
ResultCallback< TokenData > callback )
inline

Change 2FA Factor.

Parameters
mfaTokenMulti-factor authentication Token
factorThe factor will return factor based on what factors is enabled
callbackReturns a result via callback when completed

◆ CheckUserAccountAvailability() [1/2]

void AccelByte.Api.User.CheckUserAccountAvailability ( string displayName,
ResultCallback callback )
inline

Check user's account availability using displayName field. If the result is success or no error, it means the account already exists.

Parameters
displayNameUser's display name value to be checked
callbackReturn Result via callback when completed

◆ CheckUserAccountAvailability() [2/2]

void AccelByte.Api.User.CheckUserAccountAvailability ( string valueToCheck,
AccountAvailabilityField field,
ResultCallback callback )
inline

Check user's account availability. If the result is success or no error, it means the account already exists.

Parameters
valueToCheckUser's account value to be checked
fieldField to be checked
callbackReturn Result via callback when completed

◆ CreateHeadlessAccountAndResponseToken()

void AccelByte.Api.User.CreateHeadlessAccountAndResponseToken ( string linkingToken,
bool extendExp,
ResultCallback< TokenData, OAuthError > callback )
inline

Create Headless Account for Account Linking.

Parameters
linkingTokenToken for platfrom type
extendExpExtend expiration date of refresh token
callbackReturns Result via callback when completed

◆ CreateHeadlessAccountAndResponseTokenV4() [1/2]

void AccelByte.Api.User.CreateHeadlessAccountAndResponseTokenV4 ( string linkingToken,
bool extendExp,
CreateHeadlessAccountAndResponseTokenV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Create Headless Account for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
linkingTokenToken for platfrom type
extendExpExtend expiration date of refresh token
optionalParamsOptional parameter to modify the function
loginCallbackReturns Result via callback when completed

◆ CreateHeadlessAccountAndResponseTokenV4() [2/2]

void AccelByte.Api.User.CreateHeadlessAccountAndResponseTokenV4 ( string linkingToken,
bool extendExp,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Create Headless Account for Account Linking. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
linkingTokenToken for platfrom type
extendExpExtend expiration date of refresh token
loginCallbackReturns Result via callback when completed

◆ Disable2FAAuthenticator()

void AccelByte.Api.User.Disable2FAAuthenticator ( ResultCallback callback)
inline

Disable 2FA Authenticator.

Parameters
callbackReturns a result via callback when completed

◆ Disable2FABackupCodes()

void AccelByte.Api.User.Disable2FABackupCodes ( ResultCallback callback)
inline

Disable 2FA Backup Codes.

Parameters
callback

◆ Enable2FAAuthenticator()

void AccelByte.Api.User.Enable2FAAuthenticator ( string code,
ResultCallback callback )
inline

Enable 2FA Authenticator, to enable the backup code 2FA factor, you should also call Enable2FABackupcodes.

Parameters
codeVerification code
callbackReturns a result via callback when completed

◆ Enable2FABackupCodes()

void AccelByte.Api.User.Enable2FABackupCodes ( ResultCallback< TwoFACode > callback)
inline

Enable 2FA Backup Codes, this should be called if the 2FA not only using authenticator/3rd party factor.

Parameters
callback

◆ ForcedLinkOtherPlatform() [1/2]

void AccelByte.Api.User.ForcedLinkOtherPlatform ( PlatformType platformType,
string platformUserId,
ForceLinkOtherPlatformOptionalParameters optionalParameters,
ResultCallback callback )
inline

Force to Link other platform's account to the currently logged in user.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
platformUserIdUserId from other platform to be linked to
callbackReturns a Result via callback when completed

◆ ForcedLinkOtherPlatform() [2/2]

void AccelByte.Api.User.ForcedLinkOtherPlatform ( PlatformType platformType,
string platformUserId,
ResultCallback callback )
inline

Force to Link other platform's account to the currently logged in user.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
platformUserIdUserId from other platform to be linked to
callbackReturns a Result via callback when completed

◆ ForcedLinkOtherPlatformId()

void AccelByte.Api.User.ForcedLinkOtherPlatformId ( string platformId,
string platformUserId,
ResultCallback callback )
inline

Force to Link other platform's account to the currently logged in user.

Parameters
platformIdSpecify platform's type, string type of this field makes support OpenID Connect (OIDC)
platformUserIdUserId from other platform to be linked to
callbackReturns a Result via callback when completed

◆ GenerateBackUpCode()

void AccelByte.Api.User.GenerateBackUpCode ( ResultCallback< TwoFACode > callback)
inline

Generate 2FA BackUp Code, will give a new list of new backup code and make codes generated before invalid.

Parameters
callback

◆ GenerateCodeForPublisherTokenExchange()

void AccelByte.Api.User.GenerateCodeForPublisherTokenExchange ( string publisherClientId,
ResultCallback< CodeForTokenExchangeResponse > callback )
inline

This function generate a code that can be exchanged into publisher namespace token (i.e. by web portal).

Parameters
publisherClientIdThe targeted game's publisher ClientID.
callbackA callback that will be called when the operation succeeded.

◆ GenerateGameToken()

void AccelByte.Api.User.GenerateGameToken ( string code,
ResultCallback callback )
inline

Generate publisher user's game token. Required a code from request game token.

Parameters
codecode from request game token
callbackReturn Result via callback when completed

◆ GenerateGameTokenV4() [1/2]

void AccelByte.Api.User.GenerateGameTokenV4 ( string code,
GenerateGameTokenV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Generate publisher user's game token. Required a code from request game token.

Parameters
codecode from request game token
optionalParamsOptional parameter to modify the function
loginCallbackReturn Result via callback when completed

◆ GenerateGameTokenV4() [2/2]

void AccelByte.Api.User.GenerateGameTokenV4 ( string code,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Generate publisher user's game token. Required a code from request game token.

Parameters
codecode from request game token
loginCallbackReturn Result via callback when completed

◆ GenerateOneTimeCode() [1/2]

void AccelByte.Api.User.GenerateOneTimeCode ( PlatformType platformId,
GenerateOneTimeCodeOptionalParameters optionalParameters,
ResultCallback< GeneratedOneTimeCode > callback )
inline

Generate one time linking code.

Parameters
platformIdThe platform ID
optionalParametersOptional parameter to be sent
callbackResult via callback when completed

◆ GenerateOneTimeCode() [2/2]

void AccelByte.Api.User.GenerateOneTimeCode ( PlatformType platformId,
ResultCallback< GeneratedOneTimeCode > callback )
inline

Generate one time linking code.

Parameters
platformIdThe platform ID
callbackReturn Result via callback when completed

◆ GenerateSecretKeyFor3rdPartyAuthenticateApp()

void AccelByte.Api.User.GenerateSecretKeyFor3rdPartyAuthenticateApp ( ResultCallback< SecretKey3rdPartyApp > callback)
inline

Generate Secret Key For 3rd Party Authenticate Application.

Parameters
callbackReturns a result via callback when completed

◆ GetBackUpCode()

void AccelByte.Api.User.GetBackUpCode ( ResultCallback< TwoFACode > callback)
inline

Get 2FA BackUp Code.

Parameters
callback

◆ GetConfigUniqueDisplayNameEnabled()

void AccelByte.Api.User.GetConfigUniqueDisplayNameEnabled ( ResultCallback< bool > callback)
inline

Get user config value of uniqueDisplayNameEnabled.

Parameters
callbackReturn Result via callback when completed

◆ GetConfigUserNameDisabled()

void AccelByte.Api.User.GetConfigUserNameDisabled ( ResultCallback< bool > callback)
inline

Get user config value of userNameDisabled.

Parameters
callbackReturn Result via callback when completed

◆ GetConflictResultWhenLinkHeadlessAccountToFullAccount()

void AccelByte.Api.User.GetConflictResultWhenLinkHeadlessAccountToFullAccount ( string oneTimeLinkCode,
ResultCallback< ConflictLinkHeadlessAccountResult > callback )
inline

Get conflict result when link headless account to current account by one time code.

Parameters
oneTimeLinkCodeOne time link code value
callbackReturn Result via callback when completed

◆ GetCountryFromIP()

void AccelByte.Api.User.GetCountryFromIP ( ResultCallback< CountryInfo > callback)
inline

Get spesific country from user IP.

Parameters
callbackReturns a Result that contains country information via callback when completed

◆ GetCountryGroupV3()

void AccelByte.Api.User.GetCountryGroupV3 ( ResultCallback< Country[]> callback)
inline

Get all valid country codes for User Registration.

Parameters
callbackReturns a Result that contains an Array of Country via callback when completed

◆ GetData()

void AccelByte.Api.User.GetData ( ResultCallback< UserData > callback)
inline

Get current logged in user data. It will return cached user data if it has been called before.

Parameters
callbackReturns a Result that contains UserData via callback

◆ GetDataWithLinkedPlatform()

void AccelByte.Api.User.GetDataWithLinkedPlatform ( ResultCallback< UserData > callback)
inline

Get current logged in user data with platform data. It will return cached user data if it has been called before.

Parameters
callbackReturns a Result that contains UserData via callback

◆ GetInputValidations()

void AccelByte.Api.User.GetInputValidations ( string languageCode,
ResultCallback< InputValidation > callback,
bool defaultOnEmpty = true )
inline

Get IAM Input Validation.

Parameters
languageCodeLanguage Code for description
callbackReturns a result via callback when completed
defaultOnEmptywill return default language if languageCode is empty or language not available

◆ GetPlatformLinks()

void AccelByte.Api.User.GetPlatformLinks ( ResultCallback< PagedPlatformLinks > callback)
inline

Get array of other platforms this user linked to.

Parameters
callbackReturns a Result that contains PlatformLink array via callback when completed.

◆ GetPublicSystemConfigValue()

void AccelByte.Api.User.GetPublicSystemConfigValue ( ResultCallback< GetPublicSystemConfigValueResponse > callback)
inline

Get public system config value.

Parameters
callbackReturn Result via callback when completed.

◆ GetPublisherUser()

void AccelByte.Api.User.GetPublisherUser ( string userId,
ResultCallback< GetPublisherUserResponse > callback )
inline

Get Publisher User.

Parameters
userIduser id that needed to get publisher user
callbackReturn Result via callback when completed

◆ GetUserAvatar()

void AccelByte.Api.User.GetUserAvatar ( string userId,
ResultCallback< Texture2D > callback )
inline

Request the Avatar of the given UserProfile.

Parameters
userIdThe UserId of a public Profile
callbackReturns a result that contains a Texture2D

◆ GetUserByOtherPlatformUserIdV4()

void AccelByte.Api.User.GetUserByOtherPlatformUserIdV4 ( GetUserPlatformType platformType,
string platformUserId,
ResultCallback< UserData > callback )
inline

Get other user data by other platform userId.

Parameters
platformTypeUser platform's type that needed to get user data (Google, Steam, Facebook, etc).
platformUserIdPlatform UserId that needed to get user data. For Nintendo Platform, NSA ID need to be appended with Environment ID using colon as separator. e.g kmzwa8awaa:dd1.
callbackReturn a Result that contains UserData when completed.

◆ GetUserEligibleToPlay()

void AccelByte.Api.User.GetUserEligibleToPlay ( ResultCallback< bool > callback)
inline

Check if user has purchased the subscription and eligible to play.

Parameters
callbackReturns the boolean result whether the user is subscribed and eligible to play the game via callback when the operation is completed

◆ GetUserEnabledFactors()

void AccelByte.Api.User.GetUserEnabledFactors ( ResultCallback< Enable2FAFactors > callback)
inline

Get User Enabled Factors.

Parameters
callback

◆ GetUserInformation()

void AccelByte.Api.User.GetUserInformation ( string userId,
ResultCallback< GetUserInformationResponse > callback )
inline

Get User Information.

Parameters
userIduser id that needed to get user information
callbackReturn Result via callback when completed

◆ GetUserOtherPlatformBasicPublicInfo()

void AccelByte.Api.User.GetUserOtherPlatformBasicPublicInfo ( string platformId,
string[] userIds,
ResultCallback< AccountUserPlatformInfosResponse > callback )
inline

This function will get user basic and public info of 3rd party account.

Parameters
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC).
userIdsArray of user ids to get information on
callbackReturns a result that contains users' platform info via callback

◆ GetUserPublicInfo()

void AccelByte.Api.User.GetUserPublicInfo ( string userId,
ResultCallback< GetUserPublicInfoResponse > callback )
inline

Get public user info by user id.

Parameters
userIduser id that needed to get user data
callbackReturn a Result that contains usre public info when completed.

◆ LinkHeadlessAccountToCurrentFullAccount()

void AccelByte.Api.User.LinkHeadlessAccountToCurrentFullAccount ( LinkHeadlessAccountRequest linkHeadlessAccountRequest,
ResultCallback callback )
inline

Link headless account to current full account.

Parameters
linkHeadlessAccountRequeststruct that containing chosen namespace and one time link code
callbackReturn Result via callback when completed

◆ LinkOtherPlatform()

void AccelByte.Api.User.LinkOtherPlatform ( PlatformType platformType,
string platformTicket,
ResultCallback callback )
inline

Link other platform's account to the currently logged in user.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
platformTicketTicket / token from other platform to be linked to
callbackReturns a Result via callback when completed

◆ LinkOtherPlatformId()

void AccelByte.Api.User.LinkOtherPlatformId ( string platformId,
string platformTicket,
ResultCallback callback )
inline

Link other platform's account to the currently logged in user. especially to support OIDC.

Parameters
platformIdSpecify platform's type, string type of this field makes support OpenID Connect (OIDC)
platformTicketTicket / token from other platform to be linked to
callbackReturns a Result via callback when completed

◆ LoginWithCachedRefreshToken()

void AccelByte.Api.User.LoginWithCachedRefreshToken ( string cacheKey,
ResultCallback< TokenData, OAuthError > callback )
inline

Login with refresh token from local cache file.

Parameters
cacheKeyLogin unique cache name

◆ LoginWithCachedRefreshTokenV4() [1/2]

void AccelByte.Api.User.LoginWithCachedRefreshTokenV4 ( string cacheKey,
LoginWithRefreshTokenV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with refresh token from local cache file. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
cacheKeyLogin unique cache name
optionalParamsOptional parameter to modify the function
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithCachedRefreshTokenV4() [2/2]

void AccelByte.Api.User.LoginWithCachedRefreshTokenV4 ( string cacheKey,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with refresh token from local cache file. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
cacheKeyLogin unique cache name
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithDeviceId() [1/2]

void AccelByte.Api.User.LoginWithDeviceId ( ResultCallback callback)
inline

Login with device id. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
callbackReturns Result via callback when completed

◆ LoginWithDeviceId() [2/2]

void AccelByte.Api.User.LoginWithDeviceId ( ResultCallback< TokenData, OAuthError > callback)
inline

Login with device id. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
callbackReturns Result with OAuth Error via callback when completed

◆ LoginWithDeviceIdV4() [1/2]

void AccelByte.Api.User.LoginWithDeviceIdV4 ( LoginWithDeviceIdV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with device id. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
optionalParamsOptional parameter to modify the function
loginCallbackReturns Result via callback when completed

◆ LoginWithDeviceIdV4() [2/2]

void AccelByte.Api.User.LoginWithDeviceIdV4 ( ResultCallback< TokenData, OAuthError > loginCallback)
inline

Login with device id. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
loginCallbackReturns Result via callback when completed

◆ LoginWithEmailV4() [1/2]

void AccelByte.Api.User.LoginWithEmailV4 ( string email,
string password,
LoginWithEmailV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login to AccelByte account with email and password. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
emailEmail address
passwordPassword to login
optionalParamsOptional parameter to modify the function
loginCallbackReturns Result via callback when completed

◆ LoginWithEmailV4() [2/2]

void AccelByte.Api.User.LoginWithEmailV4 ( string email,
string password,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login to AccelByte account with email and password. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
emailEmail address
passwordPassword to login
loginCallbackReturns Result via callback when completed

◆ LoginWithLastRefreshTokenV4() [1/2]

void AccelByte.Api.User.LoginWithLastRefreshTokenV4 ( LoginWithRefreshTokenV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
optionalParamsOptional parameter to modify the function</param
Parameters
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithLastRefreshTokenV4() [2/2]

void AccelByte.Api.User.LoginWithLastRefreshTokenV4 ( ResultCallback< TokenData, OAuthError > loginCallback)
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithLatestRefreshToken() [1/4]

void AccelByte.Api.User.LoginWithLatestRefreshToken ( ResultCallback callback)
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already epired.

Parameters
callbackReturns Result via callback when completed

◆ LoginWithLatestRefreshToken() [2/4]

void AccelByte.Api.User.LoginWithLatestRefreshToken ( ResultCallback< TokenData, OAuthError > callback)
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already epired.

Parameters
callbackReturns Result with OAuth Error via callback when completed

◆ LoginWithLatestRefreshToken() [3/4]

void AccelByte.Api.User.LoginWithLatestRefreshToken ( string refreshToken,
ResultCallback callback )
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already expired.

Parameters
refreshTokenThe latest user's refresh token
callbackReturns Result via callback when completed

◆ LoginWithLatestRefreshToken() [4/4]

void AccelByte.Api.User.LoginWithLatestRefreshToken ( string refreshToken,
ResultCallback< TokenData, OAuthError > callback )
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already expired.

Parameters
refreshTokenThe latest user's refresh token
callbackReturns Result with OAuth Error via callback when completed

◆ LoginWithLauncher() [1/3]

void AccelByte.Api.User.LoginWithLauncher ( ResultCallback callback)
inline

Login With AccelByte Launcher. Use this only if you integrate your game with AccelByte Launcher.

Parameters
callbackReturns Result via callback when completed

◆ LoginWithLauncher() [2/3]

void AccelByte.Api.User.LoginWithLauncher ( ResultCallback< TokenData, OAuthError > callback)
inline

Login With AccelByte Launcher. Use this only if you integrate your game with AccelByte Launcher.

Parameters
callbackReturns Result with OAuth Error via callback when completed

◆ LoginWithLauncher() [3/3]

void AccelByte.Api.User.LoginWithLauncher ( string authCode,
ResultCallback< TokenData, OAuthError > callback )
inline

Login With AccelByte Launcher. Use this only if you integrate your game with AccelByte Launcher.

Parameters
callbackReturns Result with OAuth Error via callback when completed

◆ LoginWithOtherPlatform() [1/2]

void AccelByte.Api.User.LoginWithOtherPlatform ( PlatformType platformType,
string platformToken,
ResultCallback< TokenData, OAuthError > callback,
bool createHeadless,
string serviceLabel,
LoginWithMacAddress loginWithMacAddress = null )
inline

Login with token from PS4/PS5 platforms. This will automatically register a user if the user identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
platformTypeOther platform type
platformTokenToken for other platform type
callbackReturns Result with OAuth Error via callback when completed
createHeadlessSet it to true because it doesn't have username yet
serviceLabel(Early-access: for PS5 only currently)Used to validate PSN app when AppId is set on Admin Portal for PS4/PS5
loginWithMacAddressInclude mac Address information for PSN and Xbox ban reporting

◆ LoginWithOtherPlatform() [2/2]

void AccelByte.Api.User.LoginWithOtherPlatform ( PlatformType platformType,
string platformToken,
ResultCallback< TokenData, OAuthError > callback,
bool createHeadless = true,
LoginWithMacAddress loginWithMacAddress = null )
inline

Login with token from non AccelByte platforms. This will automatically register a user if the user identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
platformTypeOther platform type
platformTokenToken for other platform type
callbackReturns Result with OAuth Error via callback when completed
loginWithMacAddressInclude mac Address information for PSN and Xbox ban reporting

◆ LoginWithOtherPlatformId() [1/4]

void AccelByte.Api.User.LoginWithOtherPlatformId ( PlatformType platformType,
string platformToken,
ResultCallback callback,
bool createHeadless = true )
inline

Login with token from non AccelByte platforms. This will automatically register a user if the user identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
platformTypeOther platform type
platformTokenToken for other platfrom type
callbackReturns Result via callback when completed

◆ LoginWithOtherPlatformId() [2/4]

void AccelByte.Api.User.LoginWithOtherPlatformId ( string platformId,
string platformToken,
ResultCallback callback,
bool createHeadless = true )
inline

Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC)
platformTokenToken for other platfrom type
callbackReturns Result via callback when completed
createHeadlessSet it to true because it doesn't have username yet

◆ LoginWithOtherPlatformId() [3/4]

void AccelByte.Api.User.LoginWithOtherPlatformId ( string platformId,
string platformToken,
ResultCallback< TokenData, OAuthError > callback,
bool createHeadless,
string serviceLabel,
LoginWithMacAddress loginWithMacAddress = null )
inline

Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC)
platformTokenToken for other platform type
callbackReturns Result with OAuth Error via callback when completed
createHeadlessSet it to true because it doesn't have username yet
serviceLabel(Early-access: for PS5 only currently)Used to validate PSN app when AppId is set on Admin Portal for PS4/PS5
loginWithMacAddressInclude mac Address information for PSN and Xbox ban reporting

◆ LoginWithOtherPlatformId() [4/4]

void AccelByte.Api.User.LoginWithOtherPlatformId ( string platformId,
string platformToken,
ResultCallback< TokenData, OAuthError > callback,
bool createHeadless = true,
LoginWithMacAddress loginWithMacAddress = null )
inline

Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC)
platformTokenToken for other platform type
callbackReturns Result with OAuth Error via callback when completed
createHeadlessSet it to true because it doesn't have username yet
loginWithMacAddressInclude mac Address information for PSN and Xbox ban reporting

◆ LoginWithOtherPlatformV3()

void AccelByte.Api.User.LoginWithOtherPlatformV3 ( LoginPlatformType loginPlatformType,
string platformToken,
LoginWithOtherPlatformOptionalParameters optionalParameters,
ResultCallback< TokenData, OAuthError > callback )
inline

Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet.

Parameters
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC)
platformTokenToken for other platform type
callbackReturns Result with OAuth Error via callback when completed
createHeadlessSet it to true because it doesn't have username yet
serviceLabel(Early-access: for PS5 only currently)Used to validate PSN app when AppId is set on Admin Portal for PS4/PS5
loginWithMacAddressInclude mac Address information for PSN and Xbox ban reporting

◆ LoginWithOtherPlatformV4() [1/2]

void AccelByte.Api.User.LoginWithOtherPlatformV4 ( LoginPlatformType loginPlatformType,
string platformToken,
LoginWithOtherPlatformV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
loginPlatformTypeSpecify platform type
platformTokenToken for other platform type
optionalParamsOptional parameter to modify the function
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithOtherPlatformV4() [2/2]

void AccelByte.Api.User.LoginWithOtherPlatformV4 ( LoginPlatformType loginPlatformType,
string platformToken,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with token from non AccelByte platforms, especially to support OIDC (with 2FA enable) identified by its platform type and platform token doesn't exist yet. A user registered with this method is called a headless account because it doesn't have username yet. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
loginPlatformTypeSpecify platform type
platformTokenToken for other platform type
optionalParamsOptional parameter to modify the function
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithRefreshTokenV4() [1/2]

void AccelByte.Api.User.LoginWithRefreshTokenV4 ( string refreshToken,
LoginWithRefreshTokenV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
refreshTokenThe latest user's refresh token
optionalParamsOptional parameter to modify the function</param
Parameters
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithRefreshTokenV4() [2/2]

void AccelByte.Api.User.LoginWithRefreshTokenV4 ( string refreshToken,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Login with the latest refresh token stored on the device. Will returning an error if the token already expired. The callback will consist of login queue ticket and token data. If token data is empty, game client is expected to poll the login ticket status until they receive a response that their position is zero and then claim the ticket. Ticket status can be get using LogInQueue API, and for claiming the token please call ClaimAccessToken method.

Parameters
refreshTokenThe latest user's refresh token
loginCallbackReturns Result with OAuth Error via callback when completed

◆ LoginWithUsername() [1/2]

void AccelByte.Api.User.LoginWithUsername ( string username,
string password,
ResultCallback callback,
bool rememberMe = false )
inline

Login to AccelByte account with username (e.g. email) and password.

Parameters
usernameCould be email or phone (right now, only email supported)
passwordPassword to login
callbackReturns Result via callback when completed
rememberMeSet it to true to extend the refresh token expiration time

◆ LoginWithUsername() [2/2]

void AccelByte.Api.User.LoginWithUsername ( string username,
string password,
ResultCallback< TokenData, OAuthError > callback,
bool rememberMe = false )
inline

Login to AccelByte account with username (e.g. email) and password.

Parameters
usernameCould be email or phone (right now, only email supported)
passwordPassword to login
callbackReturns Result via callback when completed
rememberMeSet it to true to extend the refresh token expiration time

◆ LoginWithUsernameV3() [1/2]

void AccelByte.Api.User.LoginWithUsernameV3 ( string username,
string password,
ResultCallback callback,
bool rememberMe = false )
inline

Login to AccelByte account with username (or email) and password using V3 endpoint.

Parameters
usernameCould be username or email
passwordPassword to login
callbackReturns Result via callback when completed
rememberMeSet it to true to extend the refresh token expiration time

◆ LoginWithUsernameV3() [2/2]

void AccelByte.Api.User.LoginWithUsernameV3 ( string username,
string password,
ResultCallback< TokenData, OAuthError > callback,
bool rememberMe = false )
inline

Login to AccelByte account with username (or email) and password using V3 endpoint.

Parameters
usernameCould be username or email
passwordPassword to login
callbackReturns Result via callback when completed
rememberMeSet it to true to extend the refresh token expiration time

◆ Make2FAFactorDefault()

void AccelByte.Api.User.Make2FAFactorDefault ( TwoFAFactorType factor,
ResultCallback callback )
inline

Make 2FA Factor Default.

Parameters
factorThe factor will return factor based on what factors is enabled
callbackReturns a result via callback when completed

◆ RefreshData()

void AccelByte.Api.User.RefreshData ( ResultCallback< UserData > callback,
bool isIncludeAllPlatforms = false )
inline

Refresh currrent cached user data.

Parameters
callbackReturns a Result that contains UserData via callback
isIncludeAllPlatformsSet to true to also get other platform data. Default: false

◆ RefreshSession() [1/3]

void AccelByte.Api.User.RefreshSession ( ResultCallback callback)
inline

Refresh current login session. Will update current token.

Parameters
callbackReturns Result via callback when completed

◆ RefreshSession() [2/3]

void AccelByte.Api.User.RefreshSession ( ResultCallback< TokenData, OAuthError > callback)
inline

Refresh current login session. Will update current token.

Parameters
callbackReturns Result with OAuth Error via callback when completed

◆ RefreshSession() [3/3]

void AccelByte.Api.User.RefreshSession ( string refreshToken,
ResultCallback< TokenData, OAuthError > callback )
inline

Refresh current login session. Will update current token.

Parameters
refreshTokenRefresh token
callbackReturns Result via callback when completed

◆ Register() [1/4]

void AccelByte.Api.User.Register ( string emailAddress,
string password,
string displayName,
string country,
DateTime dateOfBirth,
RegisterUserOptionalParameters optionalParameters,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user
passwordPassword to login
displayNameAny string can be used as display name, make it more flexible than Usernam
countryUser's country, ISO3166-1 alpha-2 two letter, e.g. US.
dateOfBirthUser's date of birth, valid values are between 1905-01-01 until current date.
optionalParametersOptional parameters for endpoint. Can be null.
callbackReturns a Result that contains UserData via callback

◆ Register() [2/4]

void AccelByte.Api.User.Register ( string emailAddress,
string password,
string displayName,
string country,
DateTime dateOfBirth,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user
passwordPassword to login
displayNameAny string can be used as display name, make it more flexible than Usernam
callbackReturns a Result that contains UserData via callback

◆ Register() [3/4]

void AccelByte.Api.User.Register ( string emailAddress,
string password,
string displayName,
string country,
DateTime dateOfBirth,
string uniqueDisplayName,
RegisterUserOptionalParameters optionalParameters,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user, can be used as login username
passwordPassword to login, 8 to 32 characters, satisfy at least 3 out of 4 conditions(uppercase, lowercase letters, numbers and special characters) and should not have more than 2 equal characters in a row.
displayNameAny string can be used as display name, make it more flexible than Username
countryUser's country, ISO3166-1 alpha-2 two letter, e.g. US.
dateOfBirthUser's date of birth, valid values are between 1905-01-01 until current date.
uniqueDisplayNameThis is required when uniqueDisplayNameEnabled/UNIQUE_DISPLAY_NAME_ENABLED is true.
optionalParametersOptional parameters for endpoint. Can be null.
callbackReturns a Result that contains RegisterUserResponse via callback

◆ Register() [4/4]

void AccelByte.Api.User.Register ( string emailAddress,
string password,
string displayName,
string country,
DateTime dateOfBirth,
string uniqueDisplayName,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user, can be used as login username
passwordPassword to login, 8 to 32 characters, satisfy at least 3 out of 4 conditions(uppercase, lowercase letters, numbers and special characters) and should not have more than 2 equal characters in a row.
displayNameAny string can be used as display name, make it more flexible than Username
countryUser's country, ISO3166-1 alpha-2 two letter, e.g. US.
dateOfBirthUser's date of birth, valid values are between 1905-01-01 until current date.
uniqueDisplayNameThis is required when uniqueDisplayNameEnabled/UNIQUE_DISPLAY_NAME_ENABLED is true.
callbackReturns a Result that contains RegisterUserResponse via callback

◆ RegisterAndAcceptPolicies()

void AccelByte.Api.User.RegisterAndAcceptPolicies ( RegisterUserRequestv2 request,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user while optionally accepting legal policies, password, and displayName.

Parameters
requestTo accept policies, fill acceptedPolicies field
callbackReturns a Result that contains RegisterUserResponse via callback

◆ RegisterV2() [1/2]

void AccelByte.Api.User.RegisterV2 ( string emailAddress,
string username,
string password,
string displayName,
string country,
DateTime dateOfBirth,
string uniqueDisplayName,
RegisterUserOptionalParameters optionalParameters,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user, can be used as login username
usernameThe username can be used as login username, case insensitive, alphanumeric with allowed symbols underscore (_) and dot (.)
passwordPassword to login, 8 to 32 characters, satisfy at least 3 out of 4 conditions(uppercase, lowercase letters, numbers and special characters) and should not have more than 2 equal characters in a row.
displayNameAny string can be used as display name, make it more flexible than Username
countryUser's country, ISO3166-1 alpha-2 two letter, e.g. US. Use GetCountryV3() to fetch the latest Country list
dateOfBirthUser's date of birth, valid values are between 1905-01-01 until current date.
uniqueDisplayNameThis is required when uniqueDisplayNameEnabled/UNIQUE_DISPLAY_NAME_ENABLED is true.
optionalParametersOptional parameters for endpoint. Can be null.
callbackReturns a Result that contains RegisterUserResponse via callback

◆ RegisterV2() [2/2]

void AccelByte.Api.User.RegisterV2 ( string emailAddress,
string username,
string password,
string displayName,
string country,
DateTime dateOfBirth,
string uniqueDisplayName,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user, can be used as login username
usernameThe username can be used as login username, case insensitive, alphanumeric with allowed symbols underscore (_) and dot (.)
passwordPassword to login, 8 to 32 characters, satisfy at least 3 out of 4 conditions(uppercase, lowercase letters, numbers and special characters) and should not have more than 2 equal characters in a row.
displayNameAny string can be used as display name, make it more flexible than Username
countryUser's country, ISO3166-1 alpha-2 two letter, e.g. US. Use GetCountryV3() to fetch the latest Country list
dateOfBirthUser's date of birth, valid values are between 1905-01-01 until current date.
uniqueDisplayNameThis is required when uniqueDisplayNameEnabled/UNIQUE_DISPLAY_NAME_ENABLED is true.
callbackReturns a Result that contains RegisterUserResponse via callback

◆ Registerv2() [1/2]

void AccelByte.Api.User.Registerv2 ( string emailAddress,
string username,
string password,
string displayName,
string country,
DateTime dateOfBirth,
RegisterUserOptionalParameters optionalParameters,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user, can be used as login username
usernameThe username can be used as login username, case insensitive, alphanumeric with allowed symbols underscore (_) and dot (.)
passwordPassword to login, 8 to 32 characters, satisfy at least 3 out of 4 conditions(uppercase, lowercase letters, numbers and special characters) and should not have more than 2 equal characters in a row.
displayNameAny string can be used as display name, make it more flexible than Username
countryUser's country, ISO3166-1 alpha-2 two letter, e.g. US. Use GetCountryV3() to fetch the latest Country list
dateOfBirthUser's date of birth, valid values are between 1905-01-01 until current date.
optionalParametersOptional parameters for endpoint. Can be null.
callbackReturns a Result that contains RegisterUserResponse via callback

◆ Registerv2() [2/2]

void AccelByte.Api.User.Registerv2 ( string emailAddress,
string username,
string password,
string displayName,
string country,
DateTime dateOfBirth,
ResultCallback< RegisterUserResponse > callback )
inline

Register a user by giving username, password, and displayName.

Parameters
emailAddressEmail address of the user, can be used as login username
usernameThe username can be used as login username, case insensitive, alphanumeric with allowed symbols underscore (_) and dot (.)
passwordPassword to login, 8 to 32 characters, satisfy at least 3 out of 4 conditions(uppercase, lowercase letters, numbers and special characters) and should not have more than 2 equal characters in a row.
displayNameAny string can be used as display name, make it more flexible than Username
countryUser's country, ISO3166-1 alpha-2 two letter, e.g. US. Use GetCountryV3() to fetch the latest Country list
dateOfBirthUser's date of birth, valid values are between 1905-01-01 until current date.
callbackReturns a Result that contains RegisterUserResponse via callback

◆ RequestTokenByOneTimeLinkCode() [1/2]

void AccelByte.Api.User.RequestTokenByOneTimeLinkCode ( string oneTimeLinkingCode,
RequestTokenByOneTimeLinkCodeOptionalParameters optionalParameters,
ResultCallback< TokenData > callback )
inline

Generate user's token by one time link code. It requires a code which can be generated from GenerateOneTimeCode function.

Parameters
oneTimeLinkingCodeGenerated code from GenerateOneTimeCode
optionalParametersOptional parameter to be sent
callbackResult via callback when completed

◆ RequestTokenByOneTimeLinkCode() [2/2]

void AccelByte.Api.User.RequestTokenByOneTimeLinkCode ( string oneTimeLinkingCode,
ResultCallback< TokenData > callback )
inline

Generate user's token by one time link code. It requires a code which can be generated from GenerateOneTimeCode function.

Parameters
oneTimeLinkingCodeGenerated code from GenerateOneTimeCode
callbackResult via callback when completed

◆ ResetPassword()

void AccelByte.Api.User.ResetPassword ( string resetCode,
string userName,
string newPassword,
ResultCallback callback )
inline

Reset password for a username.

Parameters
resetCodeReset password code
userNameUsername with forgotten password
newPasswordNew password
callbackReturns a Result via callback when completed

◆ RetrieveUserThirdPartyPlatformToken()

void AccelByte.Api.User.RetrieveUserThirdPartyPlatformToken ( PlatformType platformType,
ResultCallback< ThirdPartyPlatformTokenData, OAuthError > callback )
inline

This function is used for retrieving third party platform token for user that login using third party, if user have not link requested platform in game namespace, will try to retrieving third party platform token from publisher namespace. Passing platform group name or it's member will return same access token that can be used across the platform members. Note: The third party platform and platform group covered for this is: (psn) ps4web, (psn) ps4, (psn) ps5, epicgames, twitch, awscognito.

Parameters
platformTypePlatform type value
callbackReturn Result via callback when completed

◆ SearchUsers() [1/2]

void AccelByte.Api.User.SearchUsers ( string query,
ResultCallback< PagedPublicUsersInfo > callback,
int offset = 0,
int limit = 100 )
inline

Get user data from another user by displayName or username. The query will be used to find the user with the most approximate username or display name.

Parameters
queryDisplay name or username that needed to get user data.
callbackReturn a Result that contains UsersData when completed.
offsetTargeted offset query filter.
limitTargeted limit query filter.

◆ SearchUsers() [2/2]

void AccelByte.Api.User.SearchUsers ( string query,
SearchType searchBy,
ResultCallback< PagedPublicUsersInfo > callback,
int offset = 0,
int limit = 100,
string platformId = null,
SearchPlatformType platformBy = SearchPlatformType::None )
inline

Get user data from another user displayName or username. The query will be used to find the user with the most approximate username or display name.

Parameters
queryDisplay name or username that needed to get user data.
searchByFilter the responded PagedPublicUsersInfo by SearchType. Choose the SearchType.ALL if you want to be responded with all query type.
callbackReturn a Result that contains UsersData when completed.
limitTargeted limit query filter.
offsetTargeted offset query filter.
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC).
platformByFilter the responded PagedPublicUsersInfo by SearchPlatformType.

◆ SearchUsersByOtherPlatformId()

void AccelByte.Api.User.SearchUsersByOtherPlatformId ( string query,
string platformId,
SearchPlatformType platformBy,
ResultCallback< PagedPublicUsersInfo > callback,
int offset = 0,
int limit = 100 )
inline

Searches for users on third-party platforms using their Username or Display Name. This function specifically targets users on platforms and utilizes the platform's DisplayName for the search.

Parameters
queryTargeted user's Username or Display Name.
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC).
platformByFilter the responded PagedPublicUsersInfo by SearchPlatformType.
callbackReturn a Result that contains UsersData when completed.
offsetTargeted offset query filter.
limitTargeted limit query filter.

◆ SearchUsersByOtherPlatformType()

void AccelByte.Api.User.SearchUsersByOtherPlatformType ( string query,
PlatformType platformType,
SearchPlatformType platformBy,
ResultCallback< PagedPublicUsersInfo > callback,
int offset = 0,
int limit = 100 )
inline

Get user data from another user by displayName or username with respect to platformType. The query will be used to find the user with the most approximate username or display name.

Parameters
queryTargeted user's Username or Display Name.
platformTypeThe PlatformType (Steam, PS4, Xbox, etc).
platformByFilter the responded PagedPublicUsersInfo by SearchPlatformType.
callbackReturn a Result that contains UsersData when completed.
offsetTargeted offset query filter.
limitTargeted limit query filter.

◆ SendResetPasswordCode()

void AccelByte.Api.User.SendResetPasswordCode ( string userName,
ResultCallback callback )
inline

Trigger an email that contains reset password code to be sent to user.

Parameters
userNameUsername to be sent reset password code to.
callbackReturns a Result via callback when completed

◆ SendUpgradeVerificationCode()

void AccelByte.Api.User.SendUpgradeVerificationCode ( string emailAddress,
ResultCallback callback )
inline

Trigger an email that contains verification code to be sent to user's email. User must be logged in with headless account. This function context is "upgradeHeadlessAccount".

Parameters
emailAddressThe email use to send verification code
callbackReturns a Result via callback when completed

◆ SendVerificationCode() [1/2]

void AccelByte.Api.User.SendVerificationCode ( ResultCallback callback)
inline

Trigger an email that contains verification code to be sent to user's email. User must be logged in. This function context is "UserAccountRegistration". If you want to set your own context, please use the other overload function.

Parameters
callbackReturns a Result via callback when completed

◆ SendVerificationCode() [2/2]

void AccelByte.Api.User.SendVerificationCode ( VerificationContext verificationContext,
ResultCallback callback )
inline

Trigger an email that contains verification code to be sent to user's email. User must be logged in.

Parameters
verificationContextThe context of what verification request
callbackReturns a Result via callback when completed

◆ SendVerificationCodeToNewUser()

void AccelByte.Api.User.SendVerificationCodeToNewUser ( string emailAddress,
SendVerificationCodeToNewUserOptionalParameters optionalParameters,
ResultCallback callback )
inline

Request for verification code to be sent via provided email address.

This is used to generate and send the code for a user that is going to register to be used for email verification when mandatoryEmailVerificationEnabled is configured on the namespace.

Parameters
emailAddressEmail address to send verification code to.
optionalParametersEndpoint optional parameters. Can be null.
callbackReturns a Result via callback when operation finishes.

◆ UnlinkAllOtherPlatform()

void AccelByte.Api.User.UnlinkAllOtherPlatform ( PlatformType platformType,
ResultCallback callback )
inline

Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login. Note: Use this API to unlink all the user's current account from their other accounts in other platforms within the game namespace. It resolves issues with the old API by ensuring successful unlinking across multiple namespaces. After calling this API, if a user logs in to any namespace with the same 3rd platform account, they will be logged in as a different account.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
callbackReturns a result via callback when completed

◆ UnlinkAllOtherPlatformId()

void AccelByte.Api.User.UnlinkAllOtherPlatformId ( string PlatformId,
ResultCallback callback )
inline

Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login. This function specially to support OIDC. Note: Use this API to unlink all the user's current account from their other accounts in other platforms within the game namespace. It resolves issues with the old API by ensuring successful unlinking across multiple namespaces. After calling this API, if a user logs in to any namespace with the same 3rd platform account, they will be logged in as a different account.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
callbackReturns a result via callback when completed

◆ UnlinkOtherPlatform()

void AccelByte.Api.User.UnlinkOtherPlatform ( PlatformType platformType,
ResultCallback callback )
inline

Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login.

Parameters
platformTypeOther platform's type (Google, Steam, Facebook, etc)
callbackReturns a result via callback when completed

◆ UnlinkOtherPlatformId()

void AccelByte.Api.User.UnlinkOtherPlatformId ( string platformId,
ResultCallback callback )
inline

Unlink other platform that has been linked to the currently logged in user. The change will take effect after user has been re-login. This function specially to support OIDC.

Parameters
platformIdSpecify platform type, string type of this field makes support OpenID Connect (OIDC)
callbackReturns a result via callback when completed

◆ Update()

void AccelByte.Api.User.Update ( UpdateUserRequest updateRequest,
ResultCallback< UserData > callback )
inline

Update some user information (e.g. language or country).

Parameters
updateRequestSet its field if you want to change it, otherwise leave it
callbackReturns a Result that contains UserData via callback when completed

◆ UpdateEmail()

void AccelByte.Api.User.UpdateEmail ( UpdateEmailRequest updateEmailRequest,
ResultCallback callback )
inline

Update user email address.

Parameters
updateEmailRequestSet verify code and user new email on the body
callbackReturns a Result that contains UserData via callback when completed

◆ UpdateUser()

void AccelByte.Api.User.UpdateUser ( UpdateUserRequest updateUserRequest,
ResultCallback< UserData > callback )
inline

Update current user.

Parameters
updateUserRequestUpdate user request variables to be updated
callbackReturn Result via callback when completed

◆ Upgrade() [1/2]

void AccelByte.Api.User.Upgrade ( string userName,
string password,
ResultCallback< UserData > callback,
bool needVerificationCode = false )
inline

Upgrade a headless account with username and password. User must be logged in before this method can be used.

Parameters
userNameUsername the user is upgraded to
passwordPassword to login with username
needVerificationCodeWill send verification code to email if true, default false
callbackReturns a Result that contains UserData via callback when completed

◆ Upgrade() [2/2]

void AccelByte.Api.User.Upgrade ( string userName,
string password,
UpgradeHeadlessAccountOptionalParameters optionalParameters,
ResultCallback< UserData > callback )
inline

Upgrade a headless account with username and password. User must be logged in before this method can be used.

Parameters
userNameUsername the user is upgraded to
passwordPassword to login with username
needVerificationCodeWill send verification code to email if true, default false
callbackReturns a Result that contains UserData via callback when completed

◆ UpgradeAndVerifyHeadlessAccount()

void AccelByte.Api.User.UpgradeAndVerifyHeadlessAccount ( UpgradeAndVerifyHeadlessRequest upgradeAndVerifyHeadlessRequest,
ResultCallback< UserData > callback )
inline

Upgrade a headless account. User must be logged in first then call SendUpgradeVerificationCode code to get verification code send to their email.

Parameters
upgradeAndVerifyHeadlessRequestContain user data that will be used to upgrade the headless account
callbackReturns a Result that contains UserData via callback when completed

◆ Upgradev2() [1/2]

void AccelByte.Api.User.Upgradev2 ( string emailAddress,
string password,
ResultCallback< UserData > callback )
inline

Upgrade a headless account with username and password. User must be logged in before this method can be used.

Parameters
emailAddressEmail Address the user is upgraded to
passwordPassword to login with username
callbackReturns a Result that contains UserData via callback when completed

◆ Upgradev2() [2/2]

void AccelByte.Api.User.Upgradev2 ( string emailAddress,
string userName,
string password,
ResultCallback< UserData > callback )
inline

Upgrade a headless account with username and password. User must be logged in before this method can be used.

Parameters
emailAddressEmail Address the user is upgraded to
userNameUsername the user is upgraded to
passwordPassword to login with username
callbackReturns a Result that contains UserData via callback when completed

◆ ValidateUserInput()

void AccelByte.Api.User.ValidateUserInput ( ValidateInputRequest request,
ResultCallback< ValidateInputResponse > callback )
inline

Validate user inputs by checking against existing input validation and profanity filter service (if enabled).

Parameters
requestRequest body, unused fields can be null
callbackReturns a result via callback when completed

◆ Verify()

void AccelByte.Api.User.Verify ( string verificationCode,
ResultCallback callback )
inline

Verify a user via an email registered as its username. User must be logged in.

Parameters
verificationCodeVerification code received from user's email
callbackReturns Result via callback when completed

◆ Verify2FACode()

void AccelByte.Api.User.Verify2FACode ( string mfaToken,
TwoFAFactorType factor,
string code,
ResultCallback< TokenData, OAuthError > callback,
bool rememberDevice = false )
inline

Verify 2FA Code.

Parameters
mfaTokenMulti-factor authentication Token
factorThe factor will return factor based on what factors is enabled
codeVerification code
callbackReturns a result via callback when completed
rememberDeviceWill record device token when true

◆ Verify2FACodeV4() [1/2]

void AccelByte.Api.User.Verify2FACodeV4 ( string mfaToken,
TwoFAFactorType factor,
string code,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Verify 2FA Code.

Parameters
mfaTokenMulti-factor authentication Token
factorThe factor will return factor based on what factors is enabled
codeVerification code
loginCallbackReturns a result via callback when completed

◆ Verify2FACodeV4() [2/2]

void AccelByte.Api.User.Verify2FACodeV4 ( string mfaToken,
TwoFAFactorType factor,
string code,
Verify2FACodeV4OptionalParameters optionalParams,
ResultCallback< TokenData, OAuthError > loginCallback )
inline

Verify 2FA Code.

Parameters
mfaTokenMulti-factor authentication Token
factorThe factor will return factor based on what factors is enabled
codeVerification code
optionalParamsOptional parameter to modify the function
loginCallbackReturns a result via callback when completed

◆ VerifyToken()

void AccelByte.Api.User.VerifyToken ( ResultCallback callback)
inline

OAuth2 token verification API.

Parameters
callback