Skip to main content

注册(Register)

AndroidiOSWindows
如果您使用的是 Unreal Engine,请参见 Unreal Engine SDK 的 Register

注册并登录账号。

函数定义

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

入参说明

note

请注意用户名和密码的 规则

参数类型说明
账号string账号,可用邮箱和手机号注册
密码string更多信息,请参见 密码规则
VerifyCodestring验证码
PhoneAreaCodestring手机区域码,例如 "86" 为中国。如果用邮件地址注册账号,字段则为空。
UserProfile账号信息(AccountProfile)账号的个人信息,包含,用户名,生日,国家地区等。
extraJsonstring扩展信息

回调处理

回调处理接口是 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);