Register (Register)
AndroidiOSPC
If you are using Unreal Engine, see Register in the 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 User name and password.
| Parameters | Type | Explanation |
|---|---|---|
| Account | string | Account, can register using email and phone number. |
| Password | string | For more details, see Password Rules. |
| VerifyCode | string | Verification code |
| PhoneAreaCode | string | Phone area code, e.g., "86" for China.If using an email address to register an account, the field is empty. |
| UserProfile | Account information (AccountProfile) | Account personal information, including username, birthday, country, etc. |
| extraJson | string | Additional 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);