Reset Password with Verification Code (ResetPasswordWithVerifyCode)
[MSDK & Player Network SDK] Reset password via verification code.
Supported Platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void ResetPasswordWithVerifyCode(
string account,
string verifyCode,
string phoneAreaCode,
string newPassword,
string channel = "Self",
string langType = "en_US",
string extraJson = "{}" );
static void ResetPasswordWithVerifyCode(
const std::string &account,
const std::string &verify_code,
const std::string &phone_area_code,
const std::string &new_password,
const std::string &channel = "Self",
const std::string &lang_type = "en_US",
const std::string &extra_json = GUA_DEFAULT_JSON_STRING);
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| account | string | Account, can be registered with email and phone number |
| verifyCode | string | Verification Code |
| phoneAreaCode | string | Phone Area Code: For example, China is "86". Leave empty if the account is an email. |
| newPassword | string | New password For more information, see Password Rules. |
| extraJson | string | Extended information |
| channel | string | Channel Currently not used by Player Network SDK, can be "" |
| langType | string | Language type Currently not used by Player Network SDK, can be "" |
| Parameters | Type | Description |
|---|---|---|
| account | std::string | Account, can be registered with email and phone number |
| verify_code | std::string | Verification code |
| channel | std::string | Channel Currently not used by Player Network SDK, can be "" |
| lang_type | std::string | Language type Currently not used by Player Network SDK, can be "" |
| new_password | std::string | New password For more information, see Password Rules. |
| phone_area_code | std::string | Phone Area Code: For example, China is "86". Leave empty if the account is an email. |
| extra_json | std::string | Extended information |
Callback Handling
The callback handling interface is GUAAccountResultObservers.The callback data structure is GUAAccountResult.
- Unity
- Unreal Engine
The callback event is AccountEvents. The callback ID is GUA_ACCOUNT_RESET_PASSWORD.
The callback event is OnAccountResultNotify. The callback ID is kMethodIDAccountResetPassword.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ResetPasswordWithVerifyCode("account", "verifyCode", "86", "newPassword");
GUA_NAMESPACE::GUAAccountService::ResetPasswordWithVerifyCode("Account", "VerifyCode", "86", "NewPassword");