Skip to content

User Role Query API Required ​

Description ​

Obtain information about the player's role by requesting the original API interface

The general interface for page third and stored value stored value, the need to query the game player role information, then the stored value operation. Basic parameters include: user ID (userId), CODE server (serverCode), the current time stamp (timeStamp), MD5 signature (sign).

Domain name from the original factory and our products of negotiation.

Sign signature in the KEY value, as long as the confidentiality can be provided by the good custom, the original factory (e.g., 8–32 characters consisting of uppercase and lowercase letters or digits, with no special characters).

Processing Flowchart ​

Request URL (Use the get mode, and suggest supporting the post mode) Test server links such as:

java
http://domain.xxx.com/user/info?userId=3258506&serverCode=ld4&timeStamp=1378456412008&sign=1faec808b862af2d5a726f993477529b

Request Parameters ​

parameter description
userIdUser IDRequired
serverCodeServer CODERequired
timeStampTimestampRequired
signSignature encryption rules MD5 (userId + serverCode + character KEY + timeStamp) Character KEY: The confidential value agreed by both parties (e.g., 8–32 characters consisting of uppercase and lowercase letters or digits, with no special characters)Required

Response Result ​

Return the result to the standard JSON format
success{"ret": 0, "msg": "ok", "data": [{"roleId": 30,"level": 30,"nick": "hello"}]}"ret":0 Received successfully
failure{"ret":1001, "msg":"parameter error"}ret non-zero error, Note: Please inform us if you have defined the wrong code

Response JSON Fields ​

Parameter Descriptio
retReturn statusRequired
msgReturn instructionsRequired
dataRole information group form, such as:"data": [{"roleId": 30,"level": 30,"nick": "hello"}]Ret is 0 - required Ret non-0- not filled
roleIdRoles ID (required for presence)Ret is 0 - required Ret non-0- not filled
nickRole name (required for presence)Ret is 0 - required Ret non-0- not filled
levelRole level (required for presence)Ret is 0 - required Ret non-0- not filled

Error Codes ​

1001 Parameter error 1002 No user exists 1003 Sign wrong 1008 Account is disabled 65535 Server Error