Query if binding is possible (QueryCanBind)
Query if binding is possible, currently only supports self-built accounts.
Depending on whether the account is registered, the callback data AccountResult will have its member variables as follows:
- Account not registered:
can_bindreturnstrueis_registerreturnsfalse.
- Account already registered:
is_registerreturns true.- If logged in and bound (with OpenID),
can_bindreturnsfalse. - If not logged in and bound (without OpenID),
can_bindreturnstrue.
Function Definition
public static void QueryCanBind(int channelId, int accountPlatType, string account, string phoneAreaCode, string extraJson = "{}");
Parameter Details
| Name | Type | Explanation |
|---|---|---|
| channelId | int | Self-hosted account channel ID ACCOUNT_PLAT_TYPE assigned by Player Network Console |
| accountPlatType | int | Platform type ID corresponding to the channel |
| account | string | Account Support for email and phone number |
| phoneAreaCode | string | Phone area code For example, "86" for China, if registering with email, the field is empty |
| extraJson | string | Additional information |
Return value
No return value.
Observers
The callback handler interface is AuthAccountResultObserver.The callback data structure is AccountResult.
Callback ID is INTL_AUTH_QUERY_CAN_BIND.
Code sample
int channelid = 11;
int accountPlatType = 3;
string account = "youremail@sample.com";
string phoneAreaCode = "";
string extraJson = "";
INTLAPI.Instance.QueryCanBind(channelid, accountPlatType, account, phoneAreaCode, extraJson);