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:
| Parameter | Type | Required | Description |
|---|---|---|---|
page | Number | No | Page number. Defaults to 1. |
pageSize | Number | No | Items per page. Defaults to 20. Maximum 100. |
order | Number | No | Sort 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
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
result | Object | Response data. |
result.users | Array | List of user profile objects. |
result.users fields:
| Field | Type | Description |
|---|---|---|
users[i].userId | String | The user ID. |
users[i].userProfile | JSON KV | Basic user profile. |
users[i].userExtProfile | JSON KV | Extended user profile. |
userProfile fields:
| Key | Type | Length/Range | Description |
|---|---|---|---|
uniqueId | String | Max 32 characters | App-specific user ID |
name | String | Max 32 characters | Nickname |
portraitUri | String | Max 128 characters | Avatar URL |
email | String | Max 128 characters | Email address |
birthday | String | Max 32 characters | Birthday |
gender | Int | 0 = unknown, 1 = male, 2 = female | Gender |
location | String | Max 32 characters | Location |
role | Int | 0–100 | Role |
level | Int | 0–100 | Level |
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"}
}
]
}
}