Skip to main content

Retrieve User Information

POST /v2/profile/userinfo

This interface allows the game to obtain detailed information of a specific user.

Request Parameters

For the query parameters for interface calls, see Query Parameters.

ParametersTypeDescriptionNotes
openidstringPlayer Network SDK user identificationRequired
tokenstringaccess tokenRequired

Request example

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"}'

Return Parameters

ParametersTypeDescription
retintReturn code
0: Success
Others: Failure
msgstringDetailed information of the result
user_namestringUser nickname
genderintGender
0: Undefined
1: Male
2: Female
birthdaystringBirth date
Format: "YYYY-MM-DD"
picture_urlstringAvatar URL
bind_listarrayBinding relationship list

The bind_list array contains bound channel accounts, each with the following parameters:

ParametersTypeDescription
channelidintChannel number
user_namestringUsername or Nickname
picture_urlstringAvatar URL
openidstringPlayer Network SDK unique user identifier

Return 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"
}