Skip to main content

List all users (paginated)

Retrieve a paginated list of all users with hosted profiles.

Request method

POST: https://Base URL/v4/user/profile/list

Rate limit: 100 requests per second

Signature required: All server API requests require signature verification. See API request signature.

Request body

The request body is in application/json format and supports the following parameters:

ParameterTypeRequiredDescription
pageNumberNoPage number. Defaults to 1.
pageSizeNumberNoItems per page. Defaults to 20. Maximum 100.
orderNumberNoSort order by registration time: 0 = ascending (default). 1 = descending.

Request example

HTTP
POST /v4/user/profile/list HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: xxxxxxxxxxxxxxxx
Content-Type: application/json

{
"page": 1,
"pageSize": 30,
"order": 1
}

Response

FieldTypeDescription
codeNumberStatus code. 0 indicates success.
resultObjectResponse data.
result.usersArrayList of user profile objects.

result.users fields:

FieldTypeDescription
users[i].userIdStringThe user ID.
users[i].userProfileJSON KVBasic user profile.
users[i].userExtProfileJSON KVExtended user profile.

userProfile fields:

KeyTypeLength/RangeDescription
uniqueIdStringMax 32 charactersApp-specific user ID
nameStringMax 32 charactersNickname
portraitUriStringMax 128 charactersAvatar URL
emailStringMax 128 charactersEmail address
birthdayStringMax 32 charactersBirthday
genderInt0 = unknown, 1 = male, 2 = femaleGender
locationStringMax 32 charactersLocation
roleInt0–100Role
levelInt0–100Level

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
"code": 0,
"result": {
"users": [
{
"userId": "u01",
"userProfile": {"appName":"testAppName","level":2},
"userExtProfile": {"ext_test":"testExt"}
}
]
}
}