Skip to main content

设置用户属性(ComplianceInitWithParams)

AndroidiOSWindows
如果您使用的是 Unreal Engine,请参见 Unreal Engine SDK 的 ComplianceInitWithParams

设置用户登录态和配置信息。

函数定义

public static bool ComplianceInitWithParams(string gameID, string openID, string token, int channelID, string langType, string extraJson, bool is_NoPB)

入参说明

名称类型说明
gameIDstring在配置文件中的游戏 ID
openIDstringOpenID,从 AuthResult 获取
tokenstringToken,从 AuthResult 获取
channelIDintChannelID,从 AuthResult 获取
langTypestring发送邮件、短信的语言
类型为 RFC 4646,例如 en 代表英文,详见 语言类型定义
extraJsonstring包含未成年认证状态的合规状态
is_NoPBbool针对非 Proxima Beta 发行且不使用 IEG 合规服务的业务,将is_NoPB设置为true。 详见 Compliance

返回值

  • 如果用户配置文件有效,则返回 true
  • 如果用户配置文件无效,则返回 false

代码示例

string gameID = "11";
string openID = "123456789";
string token = "qwer123rtyyt597";
int channelID = 0;
string langType = "en";
string extraJson = AuthResult.ExtraJson["get_status_rsp"];
bool is_NoPB = false;

bool succ = INTLAPI.ComplianceInitWithParams(gameID, openID, token, channelID, langType, extraJson, is_NoPB);