Skip to main content

Register (Register)

AndroidiOSWindows
If you're using Unreal Engine, see the Register for Unreal Engine SDK.

Register and log in to the account.

Function Definition

public static void Register(
string account,
string password,
string verifyCode,
string phoneAreaCode ,
AccountProfile userProfile,
string extraJson = "{}");

Input Parameters

note

Please note the rules for username and password.

ParametersTypeExplanation
AccountstringAccount, can register using email and phone number.
PasswordstringFor more details, see Password Rules.
VerifyCodestringVerification code
PhoneAreaCodestringPhone area code, e.g., "86" for China.If using an email address to register an account, the field is empty.
UserProfileAccount information (AccountProfile)Account personal information, including username, birthday, country, etc.
extraJsonStringAdditional information

Observers

The callback handler interface is AuthResultObserver.The callback data structure is AuthResult.

Callback ID is INTL_AUTH_REGISTER.

Code sample

string account = "";
string password = "";
string verifyCode = "";
string phoneAreaCode = "86";
AccountProfile profile = new AccountProfile();
profile.UserName = "intluser1";
profile.BirthdayYear = 1998;
profile.BirthdayMonth = 1;
profile.BirthdayDay = 12;
profile.Region = 156;
profile.LangType = "zh-Hans";
string extraJson = "{}";

INTLAPI.Register(account, password, verifyCode, phoneAreaCode, profile, extraJson);