Skip to main content

QueryCanBind [Player Network SDK Only]

[Player Network SDK Only] Queries if an account can be linked. Currently, only custom accounts are supported.

According to whether the account has registered the callback data, the member variables of GUAAccountResult will be as follows:

  1. If no account is registered:
    • can_bind returns true.
    • is_register returns false.
  2. If an account is registered:
    • is_register returns true.
    • If login linking is enabled (with OpenID), can_bind returns false.
    • If login linking is not enabled (no OpenID), can_bind returns true.

Supported Platform

Supports Android, iOS, Windows platform.

Function Definition

void QueryCanBind(int channelid, int accountPlatType, string account, string phoneAreaCode, string extraJson = "{}");

Input Parameters

ParameterTypeDescription
channelidintCustom account channel ID
ACCOUNT_PLAT_TYPE assigned by Player Network Console
accountPlatTypeintPlatform type ID of the corresponding channel
accountstringAccount
Can be an email address or phone number.
phoneAreaCodestringMobile phone area code
Such as "86" for China, fill in blanks if the account is an email
extraJsonstringExtended Information

Callback Processing

The callback processing API is GUAAccountResultObservers. The callback data structure is GUAAccountResult.

The callback event is AccountEvents. The callback methodID is GUA_ACCOUNT_QUERY_CAN_BIND.

Code Sample

UnionAdapterAPI.GetAccountService().QueryCanBind(1, 1, "account", "86");