Verification code login (LoginWithVerifyCode) [Player Network SDK only]
[Player Network SDK only] Login using a verification code.
Supported platforms
- 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
| Parameters | Type | Description |
|---|---|---|
| channel | string | Channel for custom accounts, related to platform accounts such as CustomAccount, EGame, etc. |
| account | string | Account, supporting email and phone number |
| password | string | For more information, see Password Guidelines. |
| phoneAreaCode | string | Phone area code example "86" for China, leave empty if the account is an email. |
| permissionList | string | List of permissions.Usually empty for self-built accounts. |
| Parameters | Type | Description |
|---|---|---|
| channel | std::string | Channel for custom accounts, related to platform accounts such as CustomAccount, EGame, etc. |
| account | std::string | Account, supporting email and phone number |
| password | std::string | For more information, see Password Guidelines. |
| phone_area_code | std::string | Phone area code example "86" for China, leave empty if the account is an email. |
| permission_list | std::string | List of permissions.Usually empty for self-built accounts. |
Callback Handling
The callback handling interface is GUALoginResultObservers.The callback data structure is GUALoginResult.
- Unity
- Unreal Engine
The callback event is LoginResultEvents. Callback ID is GUA_ACCOUNT_LOGIN.
The callback event is OnLoginResultNotify. The callback ID is kMethodIDAccountLogin.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().LoginWithVerifyCode("WeChat", "account", "password", "verifyCode", "86");
GUA_NAMESPACE::GUAAccountService::LoginWithVerifyCode("WeChat", "Account", "PassWord", "VerifyCode", "86");