Set Group Information
This API is used to configure basic group information, permissions, and extended information.
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/group/profile/update.json
Rate limit: 100 requests per second
Signature rules: All server API requests require signature verification. See API Request Signature.
Request Body
The HTTP request body uses application/x-www-form-urlencoded
format and supports the following form parameters:
Parameter | Type | Required | Description |
---|---|---|---|
groupId | String | Yes | Group ID (max 64 characters). Supports alphanumeric combinations. |
groupProfile | String | No | Basic group information in JSON format. See details below. |
permissions | String | No | Group permissions in JSON format. See details below. |
groupExtProfile | String | No | Extended group information in JSON format. Keys must be prefixed with ext_ (max 32 chars). Values have a 256-character limit. Default supports 10 key-value pairs. |
groupProfile
keys:
Key | Type | Length/Range | Description |
---|---|---|---|
name | String | ≤64 chars | Group name |
introduction | String | ≤512 chars | Group introduction |
announcement | String | ≤1024 chars | Group announcement |
portraitUrl | String | ≤128 chars | Group avatar URL |
permissions
keys:
Key | Type | Range | Description |
---|---|---|---|
joinPerm | Number | Options:
| Join permission |
removePerm | Number | Options:
| Remove member permission |
memInvitePerm | Number | Options:
| Invite permission |
invitePerm | Number | Options:
| Invitation handling method |
profilePerm | Number | Options:
| Modify group info/permissions |
memProfilePerm | Number | Options:
| Set member profile permission |
Request Example
POST /entrust/group/profile/update.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
groupId=testGroupId&groupProfile={"introduction":"Group introduction","name":"Group name"}
Response
The HTTP response body contains a JSON object with this structure:
Field | Type | Description |
---|---|---|
code | Number | Status code. 200 indicates success. |
Response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 200
}