注册(Register)
注册并登录账号。
函数定义
public static void Register(
string account,
string password,
string verifyCode,
string phoneAreaCode ,
AccountProfile userProfile,
string extraJson = "{}");
入参说明
note
请注意用户名和密码的 规则。
| 参数 | 类型 | 说明 |
|---|---|---|
| 账号 | string | 账号,可用邮箱和手机号注册 |
| 密码 | string | 更多信息,请参见 密码规则。 |
| VerifyCode | string | 验证码 |
| PhoneAreaCode | string | 手机区域码,例如 "86" 为中国。如果用邮件地址注册账号,字段则为空。 |
| UserProfile | 账号信息(AccountProfile) | 账号的个人信息,包含,用户名,生日,国家地区等。 |
| extraJson | string | 扩展信息 |
回调处理
回调处理接口是 AuthResultObserver。回调数据结构是 AuthResult。
回调 ID 是 INTL_AUTH_REGISTER。
代码示例
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);