Paginated Query of User's Joined Groups
This API retrieves paginated group profile information for specified users, including group ID, group name, owner, group avatar, group introduction, group announcement, group permissions, and custom attributes.
Enabling the Service
Before using this feature, you must enable the profile hosting service by submitting a ticket.
Request Method
POST: https://data center domain/entrust/joined/group/query.json
Rate Limit: 100 requests per second
Signature Rules: All server API requests require signature verification. See API Request Signature.
Request Parameters
The HTTP request body uses application/x-www-form-urlencoded
format and supports the following form parameters:
Parameter | Type | Required | Description |
---|---|---|---|
userId | String | Yes | User ID |
role | Number | No | Group role type:
|
pageToken | String | No | Page token from previous response. Omit for initial request. |
size | Number | No | Items per page. Default: 50, Max: 100. |
order | Number | No | Sort order by join time:
|
Request Example
POST /entrust/joined/group/query.json HTTP/1.1
Host: api.rong-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/x-www-form-urlencoded
pageToken=XXX&order=1&size=50&userId=userid1&role=2
Response
The HTTP response body contains a JSON object with this structure:
Field | Type | Description |
---|---|---|
code | Number | Status code. 200 indicates success. |
pageToken | String | Pagination token for next request. |
groups | JSONArray | List of group information |
groups structure | ||
groups[i].groupId | String | Group ID. |
groups[i].name | String | Group name. |
groups[i].remarkName | String | Group alias. |
groups[i].groupProfile | String | Basic group info (JSON format). |
groups[i].groupExtProfile | String | Extended group info (JSON data). |
groups[i].permissions | String | Group permissions (JSON data). |
groups[i].createTime | Long | Group creation time. |
groups[i].joinTime | Long | User join time. |
groups[i].role | Number | User's group role. |
groups[i].count | Number | Group member count. |
groupProfile
keys:
Key | Type | Description |
---|---|---|
introduction | String | Group introduction (max 512 chars). |
announcement | String | Group announcement (max 1014 chars). |
portraitUrl | String | Group avatar URL (max 128 chars). |
permissions
keys:
Key | Type | Description |
---|---|---|
joinPerm | Number | Join permission:
|
removePerm | Number | Member removal permission:
|
memInvitePerm | Number | Invitation permission:
|
invitePerm | Number | Invitation handling:
|
profilePerm | Number | Profile edit permission:
|
memProfilePerm | Number | Member profile edit permission:
|
Response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code":200,
"groups":[
{
"groupId":"g123",
"createTime":17096222222,
"count":23,
"role":1,
"name":"g1231",
"portraitUrl":"XXX",
"jointime": 1709619756077
},
{
"groupId":"g456",
"createTime":1709611111,
"count":231,
"role":2,
"name":"g3333",
"portraitUrl":"XXX",
"jointime": 1709619756077
}]
}