Skip to main content

Register

AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see Register for Unreal Engine SDK.

This API is used to register and log in to accounts.

Function definition

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

Input parameters

note

Take note about the username and password rule.

ParameterTypeDescription
AccountstringAccount, which can be registered with an email address or phone number.
PasswordstringPassword. For more information, see Password Rules.
VerifyCodestringVerification code
PhoneAreaCodestringPhone area code, such as "86" for China. If you register an account with an email address, the field is left empty.
UserProfileAccountProfilePersonal information, such as user name, birthday and more.
extraJsonstringExtended information

Observers

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

The callback methodID 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);