LoginWithVerifyCode [Player Network SDK Only]
[Player Network SDK Only] Log in with a verification code.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void LoginWithVerifyCode(
string channel,
string account,
string password,
string verifyCode,
string phoneAreaCode,
string permissionList = "");
static void LoginWithVerifyCode(
const std::string &channel,
const std::string &account,
const std::string &password,
const std::string &verify_code,
const std::string &phone_area_code,
const std::string &permission_list = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameter | Type | Description |
|---|---|---|
| channel | string | Channel of a custom account associated with the platform account, such as CustomAccount or EGame. |
| account | string | Account, supports email and mobile number |
| password | string | Password. For more information, see Password Rules. |
| phoneAreaCode | string | Phone area code, such as "86" for China. If you register an account with an email address, the field is left empty. |
| permissionList | string | Permission list. For a custom account, the field is left empty. |
| Parameter | Type | Description |
|---|---|---|
| channel | std::string | Channel of a custom account associated with the platform account, such as CustomAccount or EGame. |
| account | std::string | Account, supports email and mobile number |
| password | std::string | Password. For more information, see Password Rules. |
| phone_area_code | std::string | Phone area code, such as "86" for China. If you register an account with an email address, the field is left empty. |
| permission_list | std::string | Permission list. For a custom account, the field is left empty. |
Callback Processing
The callback processing API is GUALoginResultObservers. The callback data structure is GUALoginResult.
- Unity
- Unreal Engine
The callback event is LoginResultEvents.
The callback methodID is GUA_ACCOUNT_LOGIN.
The callback event is OnLoginResultNotify.
The callback methodID is kMethodIDAccountLogin.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().LoginWithVerifyCode("WeChat", "account", "password", "verifyCode", "86");
GUA_NAMESPACE::GUAAccountService::LoginWithVerifyCode("WeChat", "Account", "PassWord", "VerifyCode", "86");