InitCustomer
AndroidiOSWindows
If you were looking for the method for use with Unity, see InitCustomer for Unity SDK.
If you were looking for the method for use with Unity, see InitCustomer for Unity SDK.
Initializes the customer service. The asynchronous callback must be received before users call other APIs.
Function definition
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static void InitCustomer(FINTLCustomerUserProfile &userProfile);
Input parameters
Name | Type | Description |
---|---|---|
userProfile | FINTLCustomerUserProfile | Customer service module request body, mainly including important input parameters such as language type and channel ID |
CustomerUserProfile
Member variable | Type | Description | Remarks |
---|---|---|---|
langType | FString | SDK language. Specifies the language, which should follow the RFC 4646 standard, such as: en. For details, see Language Type Definitions | Required |
sign | FString | App configuration | Required |
openId | FString | Unique user ID | Required |
nickName | FString | Role nickname | Required |
gameLevel | FString | Game level | Optional |
roleId | FString | Role ID, used to locate issues for customer service | Optional |
areaId | FString | Game region ID, used to locate issues for customer service | Optional |
zoneId | FString | Game zone ID, used to locate issues for customer service | Optional |
serverId | FString | Game server ID, used to locate issues for customer service | Optional |
region | string | ISO 3166-1 numeric code for country or region For example 156 for China, 040 for Austria | Optional |
pictureUrl | FString | Avatar link | Optional |
customParam1 | FString | user tags, string of array, multiple tags are separated by ",", the default is an empty string, e.g: "recharge,suggestion" | Optional |
customParam2 | FString | custom data, json string, the default is an empty string, e.g: "{\"level\" : 34, \"total_recharge\" : 300}" | Optional |
customParam3 | FString | Spare parameter which is not in use | Optional |
customParam4 | FString | Spare parameter which is not in use | Optional |
customParam5 | FString | Spare parameter which is not in use | Optional |
info
- When any one of
langType
,sign
,openId
, andnickName
ofuserProfile
is empty, the "INVALID_ARGUMENT" error will be triggered and the client error code is 11. - When an HTML5 request fails, the "UNKNOWN" error will be triggered and the client error code is -1.
Observers
The callback processing API is CustomerResultObserver.
The callback data structure is CustomerResult.
The callback methodID is kMethodIDCustomerInit
.
Code sample
FINTLCustomerUserProfile userProfile = new FINTLCustomerUserProfile
(
"zh-Hans",
"YOUR_SIGN",
"openid",
"1",
"player1",
"",
"",
"",
"",
"",
"https://head.xxx.com/xx.png",
"recharge,suggestion",
"{\"level\" : 34, \"total_recharge\" : 300}"
);
UINTLSDKAPI::InitCustomer(userProfile);