Skip to main content

SetUserProfile

The setUserProfile API is used to set user's login information and configuration information. Call the setUserProfile API before calling other compliance APIs.

Request Parameter​

ParameterTypeDescription
gameIDnumberiTOP/MSDKV5/Player Network SDK game ID available in the configuration file
openIDstringPlayer Network SDK unique user ID
The default value is 64-bit unsigned integer string, 32-bit string is also supported.
tokenstringPlayer Network SDK user authorization token
Length: 40 bytes, see Token
channelIDnumberChannel ID of the login channel
For more information, see Login Channel and ChannelID Relationship.
regionstringISO 3166-1 numeric code for country or region
For example 156 for China, 040 for Austria

Request Sample​

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

Response Parameter​

ParameterTypeDescription
retnumberReturn code
0: Request success
!=0: Request failure, see msg for detailed return message
msgstringReturn message

Response Sample​

{
msg: "success",
ret: 0
}