SUD

Get user information (deprecated)

This interface is deprecated. Return user information in get_sstoken.user_info for new integrations. See get_sstoken.

Description

  • Obtain user information.

Callback URL

Provide callback URLs for your application server and contact SUD to configure the test and production environments separately. Deploy the production endpoint before using it.

Request method

  • Protocol: HTTPS
  • Method: POST
  • Request body format: JSON

Request parameters

Additional request fields may be introduced. Your application server must accept unknown fields.

Parameter Required Type Description
ss_token Yes string The token.

Request example

{
  "ss_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIxMjMiLCJleHAiOjE2MzA0MTc4NDksImFwcF9pZCI6ImFwcElEIn0.BWFAf7-Bi20KsFIjnQcF2ET1RNhoZRhoWa-VOxYbPuY"
}

Response parameters

Parameter Required Type Description
ret_code Yes int32 The error code. Valid values: 0: the request is successful; other values: the request has failed.
ret_msg Yes string The error information.
sdk_error_code No int32 The SDK error code. Valid values: 0: the request is successful; other values: the request has failed.
data Yes object Data.

data object

Parameter Required Type Description
uid Yes string The user ID, Maximum length 200 bytes
nick_name Yes string The user nickname.
avatar_url Yes string The URL of the user avatar. (The recommended size is 128 x 128 pixels.)
gender Yes string The gender. Valid values: female, male. If the gender is unknown, leave it empty.
is_ai No int32 Whether the player is a robot. Valid values: 0: common user; 1: robot. The parameter is set to 0 by default.
ai_level No int32 ai level
0: simple ai
1: simple ai
2: intermediate ai
3: advanced ai
Default is 0

Success response example

{
  "ret_code": 0,
  "ret_msg": "",
  "sdk_error_code": 0,
  "data": {
    "uid": "1380100177150345266",
    "nick_name": "Mengmeng",
    "avatar_url": "https://icon.png?128*128",
    "gender": "female",
    "is_ai": 0,
    "ai_level": 0
  }
}
  • The error code. Valid values: 0: the request is successful; other values: the request has failed.
  • The SDK error code. Valid values: 0: the request is successful; other values: the request has failed.

Failure response example

{
  "ret_code": 1,
  "ret_msg": "",
  "sdk_error_code": 1005,
  "data": {
    "uid": "1380100177150345266",
    "nick_name": "Mengmeng",
    "avatar_url": "https://icon.png?128*128",
    "gender": "female"
  }
}
  • The error code. Valid values: 0: the request is successful; other values: the request has failed.
  • The SDK error code. Valid values: 0: the request is successful; other values: the request has failed.

results matching ""

    No results matching ""