Skip to main content

Query if binding is possible (QueryCanBind) [Player Network SDK only]

[Player Network SDK Only] Query whether binding is allowed. Currently, only self-built accounts are supported.

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

  1. Account not registered:
    • can_bind returns true
    • is_register returns false.
  2. Account already registered:
    • is_register returns true.
    • If logged in and bound (with OpenID), can_bind returns false.
    • If there is no login binding (no OpenID), can_bind returns true.

Supported Platforms

Supports Android, iOS, Windows platform.

Function Definition

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

Input Parameters

ParametersTypeDescription
channelidintCustom Account Channel
Assigned by the Player Network Console: [ACCOUNT_PLAT_TYPE(/docs/pntconsole/configuration/ConfigureLIPASS#parameters)
accountPlatTypeintPlatform Type ID corresponding to the channel ID
accountstringAccount
Supports email and phone
phoneAreaCodestringPhone area code
For example, "86" for China, if registering with email, the field is empty
extraJsonstringExtended information

Callback Handling

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

The callback event is AccountEvents. Callback ID is GUA_ACCOUNT_QUERY_CAN_BIND.

Code Example

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