Skip to main content

QueryCanBind

AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see QueryCanBind for Unreal Engine SDK.

This API 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 AccountResult 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.

Function definition

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

Input parameters

NameTypeDescription
channelIdintCustom account channel ID
ACCOUNT_PLAT_TYPE assigned by Player Network Console
accountPlatTypeintLink target channel ID
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

Return value

No return value.

Observers

The callback processing interface is AuthAccountResultObserver. The callback data structure is AccountResult.

The callback methodID 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);