Skip to main content

SetAccountInfo

AndroidiOSWindows
If you were looking for the method for use with Unity, see SetAccountInfo for Unity SDK.

To create a custom account, the first step is to call SetAccountInfo to set necessary information. This method does not have a callback. If you do not call this method first, and use other methods to create your own account, an error message will be appear on the console.

caution
  1. After calling LevelInfinite.AutoLogin, do not call the old automatic login interface INTLAPI.AutoLogin, otherwise it will automatically log in twice.
  2. If the game is linked to a custom account, determine the local login status before calling automatic login. If the login status is a custom account, it is necessary to call INTLAPI.SetAccountInfo. (The channel information of the original custom account, where the lang_type parameter and the above SetLanguage should remain consistent). If the local login status is another channel, there is no need to call SetAccountInfo, because SetAccountInfo has been called when LI PASS is initialized. If the game is not integrated to a custom account, ignore this note.
  3. AutoLogin must be called after receiving GN_READY in the LevelInfinite.Init callback.

Function definition

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool SetAccountInfo(
const EINTLLoginChannel Channel,
const int32 ChannelID,
const FString LangType,
const int32 AccountPlatType);

Input parameters

ParameterTypeDescription
ChannelEINTLLoginChannelChannel of custom account, related to platform account, such as CustomAccount, EGame
ChannelIDint32ACCOUNT_PLAT_TYPE assigned by Player Network Console
LangTypeFStringLanguage type (RFC 4646), such as "en". It defines the language used to send emails and SMS messages.
For details, see Language Type Definition.
AccountPlatTypeint32ACCOUNT_PLAT_TYPE assigned by Player Network Console

Code sample

UINTLSDKAPI::SetAccountInfo(EINTLLoginChannel::kChannelCustomAccount,  {YOUR_ACCOUNT_PLAT_TYPE}, "en", {YOUR_ACCOUNT_PLAT_TYPE});
  • Replace {YOUR_ACCOUNT_PLAT_TYPE} with ACCOUNT_PLAT_TYPE.