Skip to main content

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:

ParameterTypeRequiredDescription
groupIdStringYesGroup ID (max 64 characters). Supports alphanumeric combinations.
groupProfileStringNoBasic group information in JSON format. See details below.
permissionsStringNoGroup permissions in JSON format. See details below.
groupExtProfileStringNoExtended 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:

KeyTypeLength/RangeDescription
nameString≤64 charsGroup name
introductionString≤512 charsGroup introduction
announcementString≤1024 charsGroup announcement
portraitUrlString≤128 charsGroup avatar URL

permissions keys:

KeyTypeRangeDescription
joinPermNumberOptions:
  • 0: Requires Group Owner approval (default)
  • 1: No approval needed
  • 2: Group Administrator or Group Owner approval
  • 3: No one can join
Join permission
removePermNumberOptions:
  • 0: Group Owner only (default)
  • 1: Group Owner + Group Administrator
  • 2: All members
Remove member permission
memInvitePermNumberOptions:
  • 0: Group Owner only (default)
  • 1: Group Owner + Group Administrator
  • 2: All members
Invite permission
invitePermNumberOptions:
  • 0: No invitee consent required (default)
  • 1: Invitee consent required
Invitation handling method
profilePermNumberOptions:
  • 0: Group Owner only (default)
  • 1: Group Owner + Group Administrator
  • 2: All members
Modify group info/permissions
memProfilePermNumberOptions:
  • 0: Group Owner + Group Administrator + self (default)
  • 1: Group Owner + self
  • 2: Self only
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:

FieldTypeDescription
codeNumberStatus code. 200 indicates success.

Response Example

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

{
"code": 200
}