Get User Information
POST /v2/profile/userinfo
This endpoint enables the game to get the detailed information of a specific user.
Request parameters
For query parameters, see Query parameters.
Parameter | Type | Description | Remark |
---|---|---|---|
openid | string | Unique user ID | Required |
token | string | access token | Required |
Request sample
curl -sS -X POST -H 'Content-Type: application/json' 'https://test.intlgame.com/v2/profile/userinfo?channelid=4&gameid=28017&os=1&seq=&source=0&ts=1609863578&sdk_version=2.0&sig=da4486973cd80766fefe824809c025ec' -d '{"openid":"1465825845797363630","token":"e14611f2bf01811bfeac1bce0addfa2ddf32d5aa"}'
Response parameters
Parameter | Type | Description |
---|---|---|
ret | int | Return code 0: success others: failure |
msg | string | Response message |
user_name | string | User name |
gender | int | Gender 0: Undefined 1: Male 2: Female |
birthday | string | Date of birth Format: "YYYY-MM-DD" |
picture_url | string | URL of user avatar |
bind_list | array | bind info list |
bind_list
array contains the linked channel accounts, each with the following parameters:
Parameter | Type | Description |
---|---|---|
channelid | int | Channel ID |
user_name | string | User name |
picture_url | string | URL of user avatar |
openid | string | Unique user ID |
Response sample
{
"ret": 0,
"msg": "success",
"bind_list": [
{
"channelid": 4,
"user_name": "xxx",
"picture_url": "https://graph.facebook.com/v3.0/2333514436748433/picture?width=160&height=160"
}
],
"user_name": "xxx",
"picture_url": "https://graph.facebook.com/v3.0/2333514436748433/picture?width=160&height=160",
"gender": 0,
"birthday": "",
"seq": "xxxxxxxxxx-xxxxxxxxxx-xxxxxx-xxxxxxxxxx"
}