Skip to main content

Query if binding is possible (QueryCanBind)

AndroidiOSWindows
If you are using the Unity engine, see Unity SDK's QueryCanBind.

Query if binding is possible, currently only supports self-built accounts.

According to whether the account is registered, the member variables of the callback data AccountResult 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 not logged in and bound (without 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 = "{}");

Parameter Details

NameTypeExplanation
ChannelIdint32Self-built account channel ID
ACCOUNT_PLAT_TYPE assigned by the Player Network Console
AccountPlatTypeint32Platform type ID corresponding to the channel
AccountFStringAccount
Support for email and phone number
PhoneAreaCodeFStringPhone area code
For example, "86" for China, if registering with email, the field is empty
ExtraJsonFStringAdditional information

Return value

Callback ID is kMethodIDAuthLaunchAccountUI.

Observers

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

Callback ID is kMethodIDAuthQueryCanBind.

Code sample

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