SDK Open API
Channel User Information Query Interface
This interface is used to query channel user information using the SDK channelUid.
Host
- platform.hoolai.com
Protocol
- Http
- https
Method
- POST
Path
- /open/public/queryUser/{channel}
channel: Path parameter, the current channel name, e.g., uc.
Request Header
- Content-Type: application/json
Request Parameters
Parameter Name | Type | Description |
---|---|---|
productId | Integer/int | Game product ID |
channelId | Integer/int | Channel ID |
channelUid | String | Query channel UID |
Request Response
- Successful Response
json {
"code": "SUCCESS",
"requestId": "96501_174_1688093800",
"value": {
"openId": 199347787,
"channelUid": "95715592e17eb7a21a64cc24e680b16e",
"channel": "uc"
},
"group": "SUCCESS",
"desc": "SUCCESS"
}
Note:
A code of SUCCESS means the query was successful. Any other code indicates failure.
- Error Response
json {
"code": "QUERY_INFO_NOT_EXIST",
"requestId": "3_1010167180_1697598882304",
"desc": "Query information does not exist",
"group": "open"
}
TIP
Note: The above is only an example of when the query information does not exist. This is one of many error response types.
Public Account User Information Query Interface by Phone Number
Host
- platform.hoolai.com
Protocol
- Http
- https
Method
- POST
Path
- /open/public/queryUser/officialAccount
Request Header
- Content-Type: application/json
Signature Key
- Contact SDK to obtain
Request Parameters
Parameter Name | Type | Description |
---|---|---|
phone | String | Phone number |
timestamp | Long/long | Timestamp in milliseconds |
sign | String | MD5 signature MD5 (phone+productId+timestamp+secretKey) in 32 lowercase characters |
productId | Int | Product ID |
Request Response
Parameter Name | Type | Description |
---|---|---|
code | String | SUCCESS means success |
value | JSON |
- Value Properties
Parameter Name | Type | Description |
---|---|---|
realNameStatus | Boolean | true: real name verified false: not verified |
userInfo | JSONArray |
- User Info Attributes
Parameter Name | Type | Remarks |
---|---|---|
productId | Integer | |
openId | Long |
- Successful Response
json {
"code": "SUCCESS",
"group": "SUCCESS",
"value": {
"realNameStatus": true,
"userInfo": [
{
"openId": 201000641,
"productId": 1
},
{
"openId": 199347706,
"productId": 73
}
]
},
"desc": "SUCCESS",
"requestId": "3_1010167180_1697598882304"
}
Note:
A code of SUCCESS means the query was successful. Any other code indicates failure.
- Error Response
json {
"code": "SIGN_NOT_MATCH",
"group": "open-api",
"desc": "Signature does not match",
"requestId": ""
}
Note:
The above is just one example of an error response.
Send Verification Code
Host
- platform.hoolai.com
Protocol
- Http
- https
Method
- POST
Path
- /open/public/sms/sendSms
Request Header
- Content-Type: application/json
Signature Key
- Contact SDK to obtain
Request Parameters
Parameter Name | Type | Description |
---|---|---|
productId | Integer | Product ID |
mobile | String | Phone numbers, separated by commas (,) for multiple numbers |
templateId | Integer | Template SMS ID, used to specify the required SMS template |
accessToken | String | MD5 encrypted string: productId+"."+requestTime+"."+productKey, returned as a 32-character hexadecimal lowercase string |
requestTime | Long | The current time in milliseconds when the request is made |
separator (selectable) | String | Custom separator. If not specified, the default separator (,) is used for splitting params. If provided, this separator will be used. Currently allowed separators are ". |
Request Response
Parameter Name | Type | Description |
---|---|---|
code | String | SUCCESS means success |
value | String | Value |
desc | String | Description |
requestId | String | Request ID |
group | String | Group |
- Successful Response
json
{
"code": "SUCCESS",
"requestId": "92982_124_1698634202",
"value": "SUCCESS",
"desc": "SUCCESS",
"group": "SUCCESS"
}
Note:
A code of SUCCESS means the query was successful. Any other code indicates failure.
- Error Response
json {
"code": "SIGN_NOT_MATCH",
"group": "open-api",
"desc": "Signature does not match"
}
Note:
The above is just one example of an error response.
Censored Word Library/Image
This interface supports censorship information/image verification through the SDK API service.
Host
- platform.hoolai.com
Protocol
- Http
- https
Method
- POST
Path
- /open/public/sensitive/moderation
Request Header
- Content-Type: application/json
Request Parameters
Parameter Name | Type | Description | Required | Optional Values |
---|---|---|---|---|
productId | Integer | Product ID | Yes | |
type | String | Data type (image/text) | Yes | image/text |
scene | String | Usage scenario (e.g., chat, naming, etc.) | No | Customizable scene names and rules; needs to be configured in the Tencent Cloud backend |
uid | Long | SDK user ID | Yes | 30000xxxxx |
roleId | String | Role ID | Yes | Game character ID |
content | String | Content | Yes | Chat text/base64(image), images must be less than 10MB |
sign | String | Signature | Yes | md5(productId+type+uid+roleId+content+timestamp+key).timestamp |
- Note: key is the signature key provided by the SDK; timestamp is the Unix timestamp, valid for 5 minutes
Request Response
- Response
json {
"code": "SUCCESS",
"group": "open-api",
"requestId": "12244_323523_4322452",
"value": {
"suggestions": "pass",
"showLabel": "You ****, you left right after starting the fight!",
"reason": "Reason (selectable)"
}
}
Note:
code being "SUCCESS" indicates the query was successful; all other values indicate failure.
- suggestions: Possible values are pass / block. When the value is block, it is recommended that the game directly inform the user: “Contains inappropriate terms.”
- showLabel: A filtered version of the input text; only applicable for text-type content.
- reason: Specific reason (optional; may be absent). It is not recommended to use this text for in-game display.