QueryCanBind
AndroidiOSWindows
If you were looking for the method for use with Unity, see QueryCanBind for Unity SDK.
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:
- If no account is registered:
can_bindreturnstrue.is_registerreturnsfalse.
- If an account is registered:
is_registerreturns true.- If login linking is enabled (with OpenID),
can_bindreturnsfalse. - If login linking is not enabled (no OpenID),
can_bindreturnstrue.
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
| Name | Type | Description |
|---|---|---|
| ChannelId | int32 | Custom account channel ID ACCOUNT_PLAT_TYPE assigned by Player Network Console |
| AccountPlatType | int32 | Link target channel ID |
| Account | FString | Account Can be an email address or phone number. |
| PhoneAreaCode | FString | Mobile phone area code Such as "86" for China, fill in blanks if the account is an email |
| ExtraJson | FString | Extended 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", "");