Register
AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see Register for Unreal Engine SDK.
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.
| Parameter | Type | Description |
|---|---|---|
| Account | string | Account, which can be registered with an email address or phone number. |
| Password | string | Password. For more information, see Password Rules. |
| VerifyCode | string | Verification code |
| PhoneAreaCode | string | Phone area code, such as "86" for China. If you register an account with an email address, the field is left empty. |
| UserProfile | AccountProfile | Personal information, such as user name, birthday and more. |
| extraJson | string | Extended 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);