Skip to main content

密码登录(LoginWithPassword)

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

函数定义

public static void LoginWithPassword(
string channel,
string account,
string password,
string phoneAreaCode,
string permissionList = "");

入参说明

参数类型说明
channelstring自建账号的渠道,与平台账号相关,如 CustomAccount,EGame 等。
accountstring账号,支持邮箱和手机号
passwordstring更多信息,请参见 密码规则
phoneAreaCodestring手机区域码,例如 "86" 为中国。如果用邮件地址注册账号,字段则为空。
permissionListstring权限列表。自建账号一般为空。

回调处理

回调处理接口是 AuthResultObserver。回调数据结构是 AuthResult

回调 ID 是 INTL_AUTH_LOGIN

代码示例

string channel = INTLChannel.CustomAccount;
string account = "";
string password = "";
string phoneAreaCode = "86";
string permissionList = "";

INTLAPI.LoginWithPassword(channel, account, password, phoneAreaCode, permissionList);