Skip to main content

Set user login status information and configuration information (SetUserProfile)

The setUserProfile API is used to set the user's login information and configuration settings.Please call the setUserProfile API before invoking other compliance APIs.

Request parameters​

ParametersTypeDescription
gameIDnumberGame ID available in iTOP/MSDKV5/Player Network SDK configurations
openIDstringPlayer Network SDK unique user identifier
Defaults to a 64-bit unsigned integer string, but can also support 32-bit.
tokenstringUser token generated by Player Network SDK
length: 40 bytes, see Token for details
channelIDnumberLogin channel ID
See Channel ID explanation
regionstringISO 3166-1 Numeric code for a country or region
For example, 156 represents China, and 040 represents Austria

Request sample​

complianceApi.setUserProfile(
{
gameID: 11,
openID: "xxx",
token: "xxx",
channelID: 52,
region: "156",
},
(res) => {
console.log(res);
}
);

Response parameters​

ParametersTypeDescription
retnumberReturn code
0: Request successful
!=0: Request failed, refer to msg for detailed results
msgstringResult Explanation

Response sample​

{
msg: "success",
ret: 0
}