QueryCanBind
AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see QueryCanBind for Unreal Engine SDK.
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:
- If no account is registered:
can_bind
returnstrue
.is_register
returnsfalse
.
- If an account is registered:
is_register
returns true.- If login linking is enabled (with OpenID),
can_bind
returnsfalse
. - If login linking is not enabled (no OpenID),
can_bind
returnstrue
.
Function definition
public static void QueryCanBind(int channelId, int accountPlatType, string account, string phoneAreaCode, string extraJson = "{}");
Input parameters
Name | Type | Description |
---|---|---|
channelId | int | Custom account channel ID ACCOUNT_PLAT_TYPE assigned by Player Network Console |
accountPlatType | int | Link target channel ID |
account | string | Account Can be an email address or phone number. |
phoneAreaCode | string | Mobile phone area code Such as "86" for China, fill in blanks if the account is an email |
extraJson | string | Extended 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);