Skip to main content

Update group channel info

Update the profile and permission settings for a group channel.

Request

POST: https://[Base URL](/platform-chat-api/base-url)/v4/group-channel/profile/update

Rate limit: 100 per second

Signature: Required. See API request signature.

Request body

Content type: application/json

ParameterTypeRequiredDescription
channelIdStringYesGroup channel ID. Max 64 characters. Supports uppercase and lowercase letters and numbers.
groupProfileJSONNoGroup basic information in JSON format. See the key descriptions below.
permissionsJSONNoGroup permission settings in JSON format. See the key descriptions below.
groupExtProfileJSONNoGroup extended information in JSON format. Keys must be prefixed with ext_ and cannot exceed 32 characters. Values cannot exceed 256 characters. Up to 10 key-value pairs are supported by default.

groupProfile keys:

KeyTypeDescription
nameStringGroup name. Max 64 characters.
introductionStringGroup introduction. Max 512 characters.
announcementStringGroup announcement. Max 1024 characters.
portraitUrlStringGroup avatar URL. Max 128 characters.

permissions keys:

KeyTypeDescription
joinPermNumberPermission to join the group. 0: Owner approval required (default). 1: No approval needed. 2: Approved by owner or admin. 3: No one can join.
removePermNumberPermission to remove members. 0: Owner only (default). 1: Owner and admins. 2: All members.
memInvitePermNumberPermission to invite others. 0: Owner only (default). 1: Owner and admins. 2: All members.
invitePermNumberInvitation handling. 0: Invitee consent not required (default). 1: Invitee consent required.
profilePermNumberPermission to modify group profile. 0: Owner only (default). 1: Owner and admins. 2: All members.
memProfilePermNumberPermission to set member profile. 0: Owner, admins, and self (default). 1: Owner and self. 2: Self only.

Request example

HTTP
POST /v4/group-channel/profile/update HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"channelId": "testGroupId",
"groupProfile": {
"introduction": "Group introduction",
"name": "Group name"
}
}

Response

FieldTypeDescription
codeNumberReturn code. 0 indicates success. See Status codes.

Response example

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

{"code":0}