Skip to main content

QueryCanBind

AndroidiOSWindows
If you were looking for the method for use with Unity, see QueryCanBind for Unity 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

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool QueryCanBind(
const int32 ChannelId,
const int32 AccountPlatType,
const FString Account,
const FString PhoneAreaCode,
const FString ExtraJson = "{}");

Input parameters

NameTypeDescription
ChannelIdint32Custom account channel ID
ACCOUNT_PLAT_TYPE assigned by Player Network Console
AccountPlatTypeint32Link target channel ID
AccountFStringAccount
Can be an email address or phone number.
PhoneAreaCodeFStringMobile phone area code
Such as "86" for China, fill in blanks if the account is an email
ExtraJsonFStringExtended Information

Return value

Returns a bool type to indicate whether the current OS is supported.

Observers

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

The callback methodID is kMethodIDAuthQueryCanBind.

Code sample

bool support = UINTLSDKAPI::QueryCanBind(11, 3, "youremail@sample.com", "");