Skip to main content

Group Information Hosting Import

Use this API to import groups created without information hosting service into hosted groups. You must specify the group owner and permissions during import. After completion, the group will support all group information hosting related APIs (including SDK group functionality).

tip

No callbacks will be triggered after import.

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/import.json

Rate limit: 100 requests per second

Signature rules: All server API requests require signature verification. See API Request Signature.

Body Parameters

The HTTP request body uses application/x-www-form-urlencoded format and supports these form parameters:

ParameterTypeRequiredDescription
groupIdStringYesGroup ID (max 64 characters), supports alphanumeric characters (case-sensitive).
nameStringYesGroup name (max 64 characters). Names can be duplicated.
ownerStringYesGroup owner ID.
groupProfileStringNoBasic group information in JSON format. See key reference below.
permissionsStringNoGroup permissions in JSON format. See key reference below.
groupExtProfileStringNoExtended group information in JSON format. Keys must be prefixed with ext_ (max 32 chars). Values limited to 256 chars. Maximum 10 key-value pairs by default.

groupProfile keys:

KeyTypeLength/RangeDescription
introductionStringMax 512 charsGroup introduction
announcementStringMax 1024 charsGroup announcement
portraitUrlStringMax 128 charsGroup avatar URL

permissions keys:

KeyTypeRangeDescription
joinPermNumberOptions:
  • 0: Owner approval required (default)
  • 1: No approval needed
  • 2: Owner or admin approval
  • 3: No one can join
Join permission
removePermNumberOptions:
  • 0: Owner only (default)
  • 1: Owner or admin
  • 2: All members
Remove member permission
memInvitePermNumberOptions:
  • 0: Owner only (default)
  • 1: Owner or admin
  • 2: All members
Invite permission
invitePermNumberOptions:
  • 0: No invitee consent needed (default)
  • 1: Invitee consent required
Invitation handling method
profilePermNumberOptions:
  • 0: Owner only (default)
  • 1: Owner or admin
  • 2: All members
Modify group profile/permission
memProfilePermNumberOptions:
  • 0: Owner, admin, or self (default)
  • 1: Owner or self
  • 2: Self only
Set member profile permission

Request Example

POST /entrust/group/import.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=2222334444&name=testGName&owner=newOwner

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,
}