Modify account with verification code (ModifyAccountWithVerifyCode)
[MSDK & Player Network SDK] Modify an account using a verification code. This feature is supported by both Player Network SDK and MSDK.
Supported Platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void ModifyAccountWithVerifyCode(
string oldAccount,
string oldAccountVerifyCode,
string oldPhoneAreaCode,
string newAccount,
string newAccountVerifyCode,
string newPhoneAreaCode,
string channel = "Self",
string langType = "en_US",
string extraJson = "{}");
static void ModifyAccountWithVerifyCode(
const std::string &old_account,
const std::string &old_account_verify_code,
const std::string &old_phone_area_code,
const std::string &new_account,
const std::string &new_account_verify_code,
const std::string &new_phone_area_code,
const std::string &channel = "Self",
const std::string &lang_type = "en_US",
const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| oldAccount | string | Old account |
| oldphoneAreaCode | string | Phone area code for the old account.If the account was registered using an email address, this field should be left empty. |
| password | string | For more information, see Password Guidelines. |
| newAccount | string | New account |
| newAccountVerifyCode | string | Verification code for new account |
| newphoneAreaCode | string | Phone area code for the new account.If the account was registered using an email address, this field should be left empty. |
| channel | string | Channel Currently not used by Player Network SDK, can be set to "" |
| langType | string | Language Type Currently not used by Player Network SDK, can be "" |
| extraJson | string | Extended information |
| Parameters | Type | Description |
|---|---|---|
| old_account | std::string | Old account |
| old_phone_area_code | std::string | Phone area code for the old account.If the account was registered using an email address, this field should be left empty. |
| password | std::string | For more information, see Password Guidelines. |
| new_account | std::string | New account |
| new_account_verify_code | std::string | Verification code for new account |
| new_phone_area_code | std::string | Phone area code for the new account.If the account was registered using an email address, this field should be left empty. |
| channel | std::string | Channel Currently not used by Player Network SDK, can be set to "" |
| lang_type | std::string | Language Type Currently not used by Player Network SDK, can be "" |
| 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_MODIFY_ACCOUNT.
The callback event is OnAccountResultNotify. The callback ID is kMethodIDAccountModifyAccount.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().ModifyAccountWithVerifyCode("oldAccount", "oldAccountVerifyCode", "886", "newAccount", "newAccountVerifyCode", "86");
GUA_NAMESPACE::GUAAccountService::ModifyAccountWithVerifyCode("OldAccount", "OldAccountVerifyCode", "886", "NewAccount", "NewAccountVerifyCode", "86");