Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
网易易盾
https://support.dun.163.com
Admin
网易易盾是网易旗下的数字内容风控与业务安全服务平台,提供内容安全检测、行为式验证码、号码认证、风控引擎以及移动应用加固等全方位的安全防护与合规解决方案。
Tokens:
757,300
Snippets:
5,327
Trust Score:
9.9
Update:
1 month ago
Context
Chat
Benchmark
35.44
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Install NEOneLogin SDK Source: https://support.dun.163.com/documents/287305921855672320?docId=720072091140734976 Commands to install the SDK package using common package managers. ```bash # npm npm install @yidun/quickpass-sdk-one-login-h5 # yarn yarn add @yidun/quickpass-sdk-one-login-h5 # pnpm pnpm add @yidun/quickpass-sdk-one-login-h5 ``` -------------------------------- ### wm.start() Source: https://support.dun.163.com/documents/15588071870066688?docId=150457222236917760 Starts the SDK to begin monitoring events. Required only when auto mode is disabled. ```APIDOC ## wm.start() ### Description Starts the SDK to begin monitoring events. This is required when the 'auto' parameter in initWatchman is set to false. ``` -------------------------------- ### LaunchStub.NEP_Init Source: https://support.dun.163.com/documents/761315885761396736?docId=784620461532909568 Initializes the Intelligent Risk Control SDK. This must be called before using any other SDK interfaces, preferably after the game starts. ```APIDOC ## NEP_Init ### Description Initializes the Intelligent Risk Control SDK and configures data passthrough to prevent reporting failures due to domain blocking. ### Method Static Method ### Signature public static bool NEP_Init(string productId, NEPConfig nepConfig, TRANSCALLBACK callback = default) ### Parameters - **productId** (string) - Required - The productId assigned by NetEase Dun. - **nepConfig** (NEPConfig) - Required - Configuration information for NEP. - **callback** (TRANSCALLBACK) - Required - Callback function for configuration delivery. ### Returns - **bool** - true if initialization succeeded, false otherwise. ### Example ```csharp NEPConfig nepConfig = new NEPConfig(); nepConfig.SetServerType(ServerType.MAINLAND); bool bIsInit = LaunchStub.NEP_Init("PRODUCTID12345670", nepConfig, transcallback); ``` ``` -------------------------------- ### Implement init interface callback (v5.5.1 and higher) Source: https://support.dun.163.com/documents/761315885761396736?docId=778684330614894592 Implementation example for the updated HTPCallback interface. ```csharp class MyHtpCallback : NetEase.HTPCallback { public void onReceive(int code, string msg) { Debug.Log("Call InitCallBack"); Debug.Log("code = " + code + " msg = " + msg); } } ``` -------------------------------- ### startDetect() Source: https://support.dun.163.com/documents/391676076156063744?docId=424655141625712640 Starts the liveness detection process. ```APIDOC ## startDetect() ### Description Starts the liveness detection process. Should be called after initialization. ``` -------------------------------- ### Implement init interface callback (v5.4.6 and earlier) Source: https://support.dun.163.com/documents/761315885761396736?docId=778684330614894592 Implementation example for the legacy HTPCallback class. ```csharp class MyHtpCallback : NetEase.HTPCallback { public override void onReceive(int code, string msg) { Debug.Log("Call InitCallBack"); Debug.Log("code = " + code + " msg = " + msg); } } ``` -------------------------------- ### Initialize SDK Instance Source: https://support.dun.163.com/documents/287305921855672320?docId=720072091140734976 Create an instance of NEOneLogin with your business credentials. ```javascript import NEOneLogin from '@yidun/quickpass-sdk-one-login-h5'; const neOneLogin = new NEOneLogin({ businessId: '从易盾申请的 businessId', logo: 'https://xxxxxx.com/logo.png', phoneInputStyle: 'square', }); ``` -------------------------------- ### initWithProductNumber:completeHandler: Source: https://support.dun.163.com/documents/15588071870066688?docId=150457251680931840 Initializes the SDK with the provided product number. This should be called once before other operations. ```APIDOC ## [Method] initWithProductNumber:completeHandler: ### Description Initializes the SDK. This method must be called once before any other SDK operations. ### Parameters - **productNumber** (NSString) - Required - The unique product identifier. - **completeHandler** (initBlock) - Required - Callback block returning status code and message. ### Example [NTESCSGuardian initWithProductNumber:@"your_product_number" completeHandler:^(NSInteger code, NSString *message) { // Handle initialization result }]; ``` -------------------------------- ### ioctl Usage Examples Source: https://support.dun.163.com/documents/761315885761396736?docId=1230667971021291520 Examples of using the ioctl interface to retrieve the SDK version and device ID. ```Objective-C NSString *sdkVersion = [[HTProtect sharedInstance] ioctl:Cmd_GetHTPVersion withData:@""]; NSString *deviceId = [[HTProtect sharedInstance] ioctl:Cmd_GetDeviceId withData:@""]; ``` ```Swift let sdkVersion = HTProtect.sharedInstance().ioctl(Cmd_GetHTPVersion, withData: "") let deviceId = HTProtect.sharedInstance().ioctl(Cmd_GetDeviceId, withData: "") ``` -------------------------------- ### Response Body Example Source: https://support.dun.163.com/documents/391676076156063744?docId=391677761079283712 Example of a JSON response body indicating the verification status and associated metadata. ```json { "code": 200, "msg": "ok", "result": { "status": 1, "taskId": "xxxxxxxxxxxxxx", "reasonType": 1, "isPayed": 1, "mobileType": "1", "mnp": "1", "oriMobileType": "1" } } ``` -------------------------------- ### void htp_init(const char *productid, const GameSetInfo &info, CallBack cb) Source: https://support.dun.163.com/documents/761315885761396736?docId=778684348184137728 初始化智能风控 SDK,必须在应用启动后第一时间调用。 ```APIDOC ## void htp_init(const char *productid, const GameSetInfo &info, CallBack cb) ### Description 用于初始化智能风控 SDK。在使用其他接口之前,必须先调用此接口。 ### Parameters - **productid** (const char *) - Required - 易盾HTP分配的productId - **info** (const GameSetInfo &) - Optional - HTP相关配置信息 - **cb** (CallBack) - Optional - 初始化结果回调函数 ### GameSetInfo 结构体 - **game_key** (std::string) - 由易盾分配的gameKey - **server_type** (int) - 服务器归属地 (1:中国大陆, 2:中国台湾, 3:海外) - **channel** (std::string) - 渠道信息 - **ext_data** (std::map<std::string, std::string>) - 额外数据 ``` -------------------------------- ### Request Body Example Source: https://support.dun.163.com/documents/391676076156063744?docId=411951634915958784 Example of a URL-encoded request body containing user identity information and authentication parameters. ```text name=张三&phone=13358123456&version=v1&businessId=xxx×tamp=1638180222235&nonce=xxx&secretId=xxx&signature=xxx ``` -------------------------------- ### Request Body Example Source: https://support.dun.163.com/documents/391676076156063744?docId=391677761079283712 Example of a URL-encoded request body containing user identity information and common parameters. ```text name=张三&cardNo=341622123456784317&phone=13358123456&version=v1&businessId=xxx×tamp=1638180222235&nonce=xxx&secretId=xxx&signature=xxx ``` -------------------------------- ### init(business: string, context: Context) Source: https://support.dun.163.com/documents/287305921855672320?docId=976927743916916736 Initializes the SDK. This must be called before using any other features, preferably in the onCreate method of the Ability. ```APIDOC ## init(business: string, context: Context) ### Description Initializes the SDK with the provided business ID and context. This is a mandatory step before calling other SDK methods. ### Parameters - **businessId** (string) - Required - The business ID for the phone number authentication service. - **context** (Context) - Required - The application context. ### Request Example NTESQuickLogin.getInstance().init("your businessId", this.context) ``` -------------------------------- ### public static void init(string productId, NetEase.HTPCallback cb, NetEase.HTProtectConfig hTProtectConfig) Source: https://support.dun.163.com/documents/761315885761396736?docId=896491640008171520 Initializes the anti-cheat SDK. This must be called as early as possible after the application starts and before using any other SDK interfaces. ```APIDOC ## SDK Initialization (init) ### Description Initializes the intelligent risk control SDK. This is a mandatory interface that must be called before any other SDK functions. ### Parameters - **productId** (string) - Required - Product ID assigned by NetEase. - **cb** (NetEase.HTPCallback) - Optional - Callback class for initialization status. - **hTProtectConfig** (NetEase.HTProtectConfig) - Optional - Configuration object for the SDK. ### Configuration (HTProtectConfig) - **setServerType(int serverType)**: Sets server region (1: Mainland China, 2: Taiwan, 3: Overseas). - **setChannel(string channel)**: Sets the application distribution channel. - **setExtraData(string key, string value)**: Sets additional data to be sent to the server. - **setGameKey(string gameKey)**: Sets the game key for security communication. - **setHost(string host)**: Sets the private server address. ``` -------------------------------- ### Query Text Feature Request Example Source: https://support.dun.163.com/documents/588434200783982592?docId=1096588497012862976 Example of a POST request to query text features with various filtering parameters. ```text version=v1&startTime=1625097600000&endTime=1625184000000&featureType=1&level=2&matchType=1&spamType=100&status=1&pageNum=1&pageSize=20&scope=1&signature=xxx&businessId=xxx&secretId=xxx×tamp=xxx&nonce=xxx ``` -------------------------------- ### Delete Text Feature Request Example Source: https://support.dun.163.com/documents/588434200783982592?docId=1096588497012862976 Example of a POST request to delete text features using a list of UUIDs. ```text version=v1&uuids=["uuid1","uuid2"]&signature=xxx&businessId=xxx&secretId=xxx×tamp=xxx&nonce=xxx ``` -------------------------------- ### public static void init(string productId, NetEase.HTPCallback cb, NetEase.HTProtectConfig hTProtectConfig) Source: https://support.dun.163.com/documents/761315885761396736?docId=778684330614894592 Initializes the intelligent risk control SDK. This must be called before any other SDK methods, preferably immediately after application startup. ```APIDOC ## SDK Initialization (init) ### Description Initializes the intelligent risk control SDK. This is a mandatory call and should be performed as early as possible in the application lifecycle. ### Parameters - **productId** (string) - Required - Product ID assigned by NetEase. - **cb** (NetEase.HTPCallback) - Optional - Callback class for initialization status. - **hTProtectConfig** (NetEase.HTProtectConfig) - Optional - Configuration object for SDK settings. ### Configuration (HTProtectConfig) - **setServerType(int serverType)**: Sets server region (1: Mainland China, 2: Taiwan, 3: Overseas). - **setChannel(string channel)**: Sets the distribution channel. - **setExtraData(string key, string value)**: Sets additional data (must be called before init). - **setGameKey(string gameKey)**: Sets game key for security communication. - **setHost(string host)**: Sets private server address. ``` -------------------------------- ### init(Context context, String businessId) Source: https://support.dun.163.com/documents/287305921855672320?docId=424017619994976256 初始化 SDK,建议在 Application 的 onCreate() 方法中调用。 ```APIDOC ## init(Context context, String businessId) ### Description 初始化 SDK,使用拉取授权页功能前必须先进行初始化操作。 ### Parameters - **context** (Context) - Required - 上下文 - **businessId** (String) - Required - 号码认证业务 id ``` -------------------------------- ### Start ID Card Detection Source: https://support.dun.163.com/documents/391676076156063744?docId=538860047245586432 Starts the ID card recognition process with a specified business ID and card orientation. ```APIDOC ## Start ID Card Detection ### Description Initiates the ID card detection process. ### Method `[self.manager startDetectWithBusinessID:cardReverseType:completionHandler:]` ### Parameters - **businessID** (NSString) - Required - The business ID assigned by NetEase Dun. - **cardReverseType** (enum) - Required - The detection orientation (NTESCardReverseTypeFront for front, NTESCardReverseTypeBack for back). ### Response - **status** (enum) - The result status of the detection (e.g., NTESOcrCheckPass, NTESOcrCheckNotPass, etc.). - **params** (NSDictionary) - Contains the result data, such as "imageFilePath". ``` -------------------------------- ### Start Liveness Detection Source: https://support.dun.163.com/documents/391676076156063744?docId=751981630302515200 Starts the liveness detection process using a business ID and handles callbacks for actions, checking, and completion. ```APIDOC ## [Method] startLiveDetectWithBusinessID:actionsHandler:checkingHandler:completionHandler: ### Description Begins the liveness detection process. ### Parameters - **businessID** (NSString) - Required - Business ID assigned by NetEase. - **actionsHandler** (block) - Required - Callback to receive detection actions. - **checkingHandler** (block) - Optional - Callback triggered when actions are complete and cloud detection begins. - **completionHandler** (block) - Required - Callback for final detection status and token. ``` -------------------------------- ### init(String productId, {Map<String, dynamic>? params}) Source: https://support.dun.163.com/documents/761315885761396736?docId=829073167615721472 初始化智能风控 SDK。这是必须调用的接口,建议在应用启动后第一时间调用。 ```APIDOC ## init(String productId, {Map<String, dynamic>? params}) ### Description 初始化智能风控 SDK。在调用其他接口前必须先调用此接口。 ### Parameters - **productId** (String) - 必填 - 易盾HTP分配的productId - **params** (Map<String, dynamic>) - 可选 - 包含 serverType, channel, extData, host 等配置信息 ### Response - **code** (int) - 初始化结果码 (200: 成功, 199: 参数错误, 400: 服务端转发) - **msg** (String) - 初始化结果详情 ``` -------------------------------- ### init(Context, NISCameraPreview, String) Source: https://support.dun.163.com/documents/391676076156063744?docId=424655141625712640 Initializes the liveness detection engine with the provided context, camera preview, and business ID. ```APIDOC ## init(Context context, NISCameraPreview cameraPreview, String businessId) ### Description Initializes the liveness detection engine. ### Parameters - **context** (Context) - Required - The application context. - **cameraPreview** (NISCameraPreview) - Required - The camera preview view. - **businessId** (String) - Required - The business identifier for the liveness detection. ``` -------------------------------- ### Asynchronous Detection Response Example Source: https://support.dun.163.com/documents/588434277524447232?docId=588512433971273728 Example JSON structure for an asynchronous image detection response, including status, suggestion, and detailed label information. ```json { "code": 200, "msg": "ok", "result": [ { "antispam": { "taskId": "cb047f822b444668ad90453fbd4d88f4", "status": 2, "suggestion": 2, "censorType": 1, "dataId": "dataId", "name": "name", "resultType": 1, "labels": [ { "label": 500, "level": 2, "rate": 1.0, "subLabels": [ { "subLabel": 50003, "rate": 1.0, "details": { "keywords": [ { "word": "自定义敏感词", "x1": 0.0473, "y1": 0.0362, "x2": 0.1964, "y2": 0.1530 } ], "libInfos": [ { "entity": "自定义图片名单url", "hitCount": 3, "value": "可识别内容", "group": "可识别内容分组" } ``` -------------------------------- ### Risk Detail Query Request Example Source: https://support.dun.163.com/documents/761315885761396736?docId=771165433203789824 JSON payload example for the risk detail query interface, including common authentication parameters and specific query filters. ```json { "businessId": "xxx966f73yyy59440583zzz9bfcc79df", "secretId": "nnn966f73yyy59440583zzz9bfcc79dc", "timestamp": ${currentTimeMs}, "nonce": "mmm888f73yyy59440583zzz9bfcc79de", "version": "500", "signature": "lll888f73yyy59440583zzz9bfcc79da", "beginTimestamp": 1667959831798, "endTimestamp": 1667959915103, "startFlag": "", "account": "zzzzzzz", "roleId": "yyyyyyy", "riskLevel": 1, "packageName": "com.aaa.bbb", "appVersion": "1.0.2", "ip": "192.168.1.1", "sdkIp": "192.168.0.1" } ``` -------------------------------- ### Initialize Quick Login Source: https://support.dun.163.com/documents/287305921855672320?docId=976927743916916736 Initialization should be performed in the Ability's OnCreate method. ```typescript NTESQuickLogin.getInstance().init("your businessId", this.context); ``` -------------------------------- ### GET https://openapi.dun.163.com/openapi/v2/antispam/label/query Source: https://support.dun.163.com/documents/601492044329328640?docId=444281309180616704 获取AI内容安全审核接口返回的标签信息,支持轮询调用以获取更新。 ```APIDOC ## GET https://openapi.dun.163.com/openapi/v2/antispam/label/query ### Description 获取AI内容安全审核接口返回的标签信息,客户可以通过轮询调用该接口获取数据。该接口支持获取通用标签信息,也可通过指定clientId、businessId等参数获取私有标签信息。 ### Method GET ### Endpoint https://openapi.dun.163.com/openapi/v2/antispam/label/query ### Parameters #### Query Parameters - **clientId** (String) - Optional - 客户ID(CID)。 - **businessId** (String) - Optional - 业务ID。 - **businessTypes** (String[]) - Optional - 业务类型,文本-100,图片-200,视频-300,音频-400。多个业务类型之间用,分隔。 - **maxDepth** (Number) - Optional - 最大标签层级,默认只返回到2级,最大支持到3级。 - **language** (String) - Optional - 对应语种的标签名,支持:ara, pt, spa, en, id。 ### Response #### Success Response (200) - **code** (Number) - 接口调用状态,200为正常。 - **msg** (string) - 结果说明。 - **data** (Object[]) - 标签信息列表。 #### Response Example { "code": 200, "data": [ { "label": 100, "name": "色情", "subLabels": [] } ], "msg": "OK" } ``` -------------------------------- ### Captcha.getInstance().init Source: https://support.dun.163.com/documents/15588062143475712?docId=976931619432841216 Initializes the Captcha SDK with the provided UI context and configuration settings. ```APIDOC ## Captcha.getInstance().init(context, configuration) ### Description Initializes the Captcha SDK instance. This method must be called with a valid UI context and a configuration object. ### Parameters - **context** (UIContext) - Required - The current UI context. - **configuration** (CaptchaConfiguration) - Required - The configuration object containing settings such as captchaId, listener, and UI preferences. ### Configuration Options (CaptchaConfiguration) - **setCaptchaId** (string) - Required - Business ID. - **setListener** (CaptchaListener) - Required - Callback listener. - **setMobileTimeout** (number) - Optional - Timeout in ms (default: 10s). - **setLangType** (LangType) - Optional - Language type enum. - **setTheme** (Theme) - Optional - Theme enum (default: Theme.LIGHT). - **setDefaultFallback** (boolean) - Optional - Whether to use default fallback (default: true). - **setErrorFallBackCount** (number) - Optional - Max error count before fallback (default: 3). - **setHideCloseButton** (boolean) - Optional - Hide close button (default: false). - **setProtocol** (string) - Optional - Resource loading protocol (default: https). - **setIpv6** (boolean) - Optional - Enable IPv6 (default: false). - **setExtraData** (string) - Optional - Extra parameters for secondary verification. - **setApiServer** (string) - Optional - Private deployment API domain. - **setStaticServer** (string) - Optional - Private deployment resource domain. - **setShowInnerClose** (boolean) - Optional - Show internal close button (default: false). - **setRadius** (number) - Optional - Popup corner radius (default: 0). - **setRefreshInterval** (number) - Optional - Error prompt duration in ms (default: 300). - **setIsDebug** (boolean) - Optional - Enable debug logs (default: false). - **setAutoCancel** (boolean) - Optional - Allow closing by clicking mask (default: true). - **setMaskColor** (Color/number/string/Resource) - Optional - Mask layer color. - **setUiParamsJson** (string) - Optional - Advanced UI configuration as a JSON string. ``` -------------------------------- ### GET https://openapi.dun.163.com/openapi/v2/antispam/label/query Source: https://support.dun.163.com/documents/596426875864846336?docId=444281309180616704 获取AI内容安全审核接口返回的标签信息,支持按业务类型、层级及语种进行过滤。 ```APIDOC ## GET https://openapi.dun.163.com/openapi/v2/antispam/label/query ### Description 获取AI内容安全审核接口返回的标签信息,客户可以通过轮询调用该接口获取数据。该接口支持获取通用标签信息,也可通过指定clientId、businessId等参数,获取客户账号或业务下的私有标签信息。 ### Method GET ### Endpoint https://openapi.dun.163.com/openapi/v2/antispam/label/query ### Parameters #### Query Parameters - **clientId** (String) - Optional - 客户ID(CID)。 - **businessId** (String) - Optional - 业务ID,查询businessId的业务级私有标签。 - **businessTypes** (String[]) - Optional - 业务类型,文本-100,图片-200,视频-300,音频-400。多个业务类型之间用,分隔。 - **maxDepth** (Number) - Optional - 最大标签层级,默认只返回到2级,最大支持到3级。 - **language** (String) - Optional - 对应语种的标签名,支持:ara, pt, spa, en, id。 ### Request Example https://openapi.dun.163.com/openapi/v2/antispam/label/query?maxDepth=3&clientId=123&businessId=123&businessTypes=100 ### Response #### Success Response (200) - **code** (Number) - 接口调用状态,200:正常 - **msg** (string) - 结果说明 - **data** (Object[]) - 标签的信息列表 #### Response Example { "code": 200, "data": [ { "label": 100, "name": "色情", "subLabels": [ { "businessId": "businessId", "businessType": [100], "code": 222, "createTime": 1669100431548, "depth": 2, "name": "二级标签", "type": 3, "subLabels": [ { "businessId": "businessId", "businessType": [100], "code": 333, "createTime": 1669100431548, "depth": 3, "name": "三级标签", "type": 3 } ] } ] } ], "msg": "OK" } ``` -------------------------------- ### GET https://openapi.dun.163.com/openapi/v2/audit/userCensor/callback Source: https://support.dun.163.com/documents/359794278577393664?docId=1012818161702641664 通过轮询调用此接口获取人工审核结果。接口响应较快,建议设置1s超时时间。 ```APIDOC ## GET https://openapi.dun.163.com/openapi/v2/audit/userCensor/callback ### Description 用户数据人工审核的结果,客户可以通过轮询调用该接口获取结果数据。 ### Method GET ### Endpoint https://openapi.dun.163.com/openapi/v2/audit/userCensor/callback ### Parameters #### Query Parameters - **yidunRequestId** (String) - Optional - 幂等参数 ### Request Example https://openapi.dun.163.com/openapi/v2/audit/userCensor/callback?yidunRequestId=xxx ### Response #### Success Response (200) - **code** (Number) - 接口调用状态,200:正常 - **msg** (string) - 结果说明 - **data** (Array) - 回调结果数组 #### Response Example { "code": 200, "msg": "成功", "data": [{ "account": "UserId1", "censorLabels": [{ "code": "code1", "name": "标签名称1", "customCode": "xxxxx1", "desc": "描述1" }, { "code": "code2", "name": "标签名称2", "customCode": "xxxxx2", "desc": "描述2" }] }] } ``` -------------------------------- ### SDK 初始化接口(init) Source: https://support.dun.163.com/documents/761315885761396736?docId=765722953272528896 用于初始化智能风控 SDK,是调用其他接口的前提。 ```APIDOC ## init ### Description 初始化智能风控 SDK。 ### Method SDK Method ### Parameters - **secretId** (string) - Required - 易盾分配的业务ID ``` -------------------------------- ### 配置接口 (NTESRiskUniConfiguration) Source: https://support.dun.163.com/documents/761315885761396736?docId=765722596493144064 用于设置 SDK 的运行环境参数,必须在 init 之前调用。 ```APIDOC ## + (void)setServerType:(NSInteger)type; ### Description 设置服务器归属地。1: 中国大陆, 2: 中国台湾, 3: 海外, 5: IPv6。 ## + (void)setChannel:(NSString *)channel; ### Description 设置应用包体来源渠道信息。 ## + (void)setExtraData:(NSString *)key forValue:(NSString *)value; ### Description 设置额外数据,支持多次调用。 ## + (void)setHost:(NSString *)host; ### Description 设置私有化服务器地址(域名或IP:端口)。 ``` -------------------------------- ### GET https://openapi.dun.163.com/openapi/v2/audit/userCensor/submit Source: https://support.dun.163.com/documents/359794278577393664?docId=1012818128721248256 提交待审用户相关信息至SAAS用户审核模块。 ```APIDOC ## GET https://openapi.dun.163.com/openapi/v2/audit/userCensor/submit ### Description 该接口支持客户自行提交待审用户相关信息至SAAS用户审核模块进行审核。接口响应较快,建议业务方设置1s超时时间。 ### Method GET ### Endpoint https://openapi.dun.163.com/openapi/v2/audit/userCensor/submit ### Parameters #### Query Parameters - **clientId** (String) - Required - 客户ID(CID),海外账号需在CID前补充前缀。 - **account** (String) - Required - 用户唯一标识。 - **ruleId** (Number) - Required - 用户审核打标规则的Id。 - **profileUrl** (string) - Optional - 用户主页地址。 - **phone** (string) - Optional - 手机号,支持传入md5(phone)哈希值。 - **nickname** (String) - Optional - 用户昵称。 - **gender** (Number) - Optional - 用户性别,0未知,1男,2女。 - **age** (Number) - Optional - 用户年龄。 - **level** (Number) - Optional - 用户等级。 - **registerTime** (Number) - Optional - 注册时间,UNIX 时间戳(毫秒值)。 - **friendNum** (Number) - Optional - 好友数。 - **fansNum** (Number) - Optional - 粉丝数。 - **isPremiumUse** (Number) - Optional - 是否付费用户,0为默认值,1为付费。 - **role** (string) - Optional - 用户类型角色。 - **ip** (string) - Optional - 用户ip。 - **extension** (string) - Optional - 用户信息扩展字段。 ### Request Example https://openapi.dun.163.com/openapi/v2/audit/userCensor/submit?clientId=111&userAccount=222&ruleId=xxx ### Response #### Success Response (200) - **code** (Number) - 接口调用状态,200为正常。 - **msg** (String) - 结果说明。 - **data** (Boolean) - true为数据处理成功,false为数据处理失败。 #### Response Example { "code": 200, "msg": "ok", "data": true } ``` -------------------------------- ### GET https://openapi.dun.163.com/openapi/resourcebill/query Source: https://support.dun.163.com/documents/287672004030681088?docId=492058063804317696 查询指定服务在特定时间范围内的资源账单信息。 ```APIDOC ## GET https://openapi.dun.163.com/openapi/resourcebill/query ### Description 查询指定服务的资源账单,支持按计费量或计费金额进行查询。 ### Method GET ### Endpoint https://openapi.dun.163.com/openapi/resourcebill/query ### Parameters #### Query Parameters - **secretId** (String) - Required - 商户密钥(AccessKey ID) - **timestamp** (Number) - Required - 请求当前 UNIX 时间戳,单位毫秒 - **nonce** (Number) - Required - 随机整数,用于防止重放攻击 - **signature** (String) - Required - 请求签名 - **serviceType** (Number) - Required - 查询哪个服务的资源账单,0代表内容安全 - **queryType** (Number) - Required - 1 计费量;2 计费金额 - **startTime** (Number) - Required - 资源账单开始时间,单位毫秒 - **endTime** (Number) - Required - 资源账单结束时间戳,单位毫秒 - **pageNum** (Number) - Required - 页码,从1开始 - **pageSize** (Number) - Required - 页大小,最大 100 ### Response #### Success Response (200) - **code** (Number) - 接口调用状态,200:正常 - **msg** (String) - 结果说明 - **result** (Object) - 账单信息,包含 totalCount 和 data 数组 ``` -------------------------------- ### NEOneLogin Initialization Source: https://support.dun.163.com/documents/287305921855672320?docId=720072091140734976 Initializes the NEOneLogin SDK instance with the required business configuration. ```APIDOC ## NEOneLogin Initialization ### Description Initializes the SDK instance with the business ID and UI configuration. ### Constructor new NEOneLogin(options) ### Parameters - **businessId** (string) - Required - The business ID obtained from Yidun. - **logo** (string) - Optional - URL for the logo displayed on the authorization page. - **phoneInputStyle** (string) - Optional - Style configuration for the phone input field (e.g., 'square'). ### Example ```javascript import NEOneLogin from '@yidun/quickpass-sdk-one-login-h5'; const neOneLogin = new NEOneLogin({ businessId: 'your-business-id', logo: 'https://example.com/logo.png', phoneInputStyle: 'square' }); ``` ``` -------------------------------- ### GET https://api.aq.163.com/v2/livewall/callback/results Source: https://support.dun.163.com/documents/2018041903?docId=188441600741003264 获取直播墙审核结果,包含截图证据信息及违规分类信息等。请求频率限制为小于10s/20次。 ```APIDOC ## GET https://api.aq.163.com/v2/livewall/callback/results ### Description 该接口用于获取直播墙审核结果,结果包含截图证据信息及违规分类信息等。 ### Method GET ### Endpoint https://api.aq.163.com/v2/livewall/callback/results ### Parameters #### Query Parameters - **公共参数** (Object) - Required - 该接口参数与请求公共参数一致,详细见请求公共参数文档。 ### Response #### Success Response (200) - **result** (json数组) - 检测结果数组 #### Response Example { "result": [ { "callback": "string", "taskId": "string", "status": 102, "action": 3, "actionTime": 1625000000000, "label": 100, "detail": "违规详细说明", "warnCount": 0, "evidence": { "snapshot": "http://example.com/image.jpg" } } ] } ``` -------------------------------- ### GET https://as.dun.163.com/v3/liveaudio/callback/results Source: https://support.dun.163.com/documents/2018082201?docId=274670761104560128 获取直播语音检测结果的离线接口。该接口支持获取反垃圾检测、语音识别及语种识别结果,并确保数据获取的唯一性。 ```APIDOC ## GET https://as.dun.163.com/v3/liveaudio/callback/results ### Description 直播语音检测结果获取接口,获取离线处理的数据后,下次调用,不会再次返回之前获取过的离线数据。 ### Method GET ### Endpoint https://as.dun.163.com/v3/liveaudio/callback/results ### Parameters #### Query Parameters - **version** (String) - Required - 接口版本v3 ### Response #### Success Response (200) - **antispam** (json数组) - 反垃圾检测结果 - **asr** (json数组) - 语音识别检测结果 - **language** (json数组) - 语种识别检测结果 #### Response Example { "result": { "antispam": [], "asr": [], "language": [] } } ``` -------------------------------- ### SDK 初始化完整示例 Source: https://support.dun.163.com/documents/761315885761396736?docId=778684309123280896 展示了在 Activity 中配置参数并调用 init 接口的完整流程。 ```java .... import com.netease.htprotect.HTProtect; // 调入sdk的接口类 .... public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); .... Context mContext = getApplicationContext(); HTProtectConfig config = new HTProtectConfig(); config.setGameKey("xxxxxxxxxxxxxxx"); // 设置gamekey,具体值请联系易盾客服 config.setServerType(2); // 设置数据上报的服务器归属地,应用/游戏根据自身发行地区来控制 config.setChannel("testchannel"); // 设置渠道信息 config.setExtraData("111","2222"); // 设置额外数据 config.setExtraData("3333","4444"); // 设置额外数据 HTPCallback callback = new HTPCallback() { @Override public void onReceive(int paramInt, String paramString) { Log.d("Test", "code is:" + paramInt + " String is:" + paramString); // paramInt返回200说明初始化成功 } }; HTProtect.init(mContext, "易盾提供的产品id", callback, config); //调用sdk初始化接口init函数 .... } } ``` -------------------------------- ### GET https://openapi.dun.163.com/openapi/v2/antispam/label/query Source: https://support.dun.163.com/documents/2018041901?docId=444281309180616704&locale=zh-cn 查询AI内容安全审核标签信息,支持获取通用标签以及指定客户或业务下的私有标签。 ```APIDOC ## GET https://openapi.dun.163.com/openapi/v2/antispam/label/query ### Description 获取AI内容安全审核接口返回的标签信息,客户可以通过轮询调用该接口获取数据。该接口支持获取通用标签信息,也可通过指定clientId、businessId等参数,获取客户账号或业务下的私有标签信息。 ### Method GET ### Endpoint https://openapi.dun.163.com/openapi/v2/antispam/label/query ### Parameters #### Query Parameters - **clientId** (String) - Optional - 客户ID(CID)。 - **businessId** (String) - Optional - 业务ID,查询业务级私有标签。 - **businessTypes** (String[]) - Optional - 业务类型,文本-100,图片-200,视频-300,音频-400。多个业务类型之间用,分隔。 - **maxDepth** (Number) - Optional - 最大标签层级,默认只返回到2级,最大支持到3级。 - **language** (String) - Optional - 对应语种的标签名,如:ara, pt, spa, en, id。 ### Response #### Success Response (200) - **code** (Number) - 接口调用状态,200为正常。 - **msg** (string) - 结果说明。 - **data** (Object[]) - 标签信息列表。 #### Response Example { "code": 200, "data": [ { "label": 100, "name": "色情", "subLabels": [ { "businessId": "businessId", "businessType": [100], "code": 222, "createTime": 1669100431548, "depth": 2, "name": "二级标签", "type": 3 } ] } ], "msg": "OK" } ``` -------------------------------- ### initWatchman(options) Source: https://support.dun.163.com/documents/15588071870066688?docId=150457222236917760 Initializes the SDK to obtain an instance object. This must be called once after embedding the script. ```APIDOC ## initWatchman(options) ### Description Initializes the SDK to obtain an instance object. This must be called once after embedding the script. ### Parameters - **productNumber** (String) - Required - Product identifier. - **protocol** (String) - Optional - Data transmission protocol (http or https). - **auto** (Boolean) - Optional - Whether to enable automated mode (default: true). - **onload** (Function) - Required - Callback function executed after successful initialization, receiving the SDK instance. - **onerror** (Function) - Optional - Callback function executed if initialization fails. ```