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).
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:
Parameter | Type | Required | Description |
---|---|---|---|
groupId | String | Yes | Group ID (max 64 characters), supports alphanumeric characters (case-sensitive). |
name | String | Yes | Group name (max 64 characters). Names can be duplicated. |
owner | String | Yes | Group owner ID. |
groupProfile | String | No | Basic group information in JSON format. See key reference below. |
permissions | String | No | Group permissions in JSON format. See key reference below. |
groupExtProfile | String | No | Extended 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:
Key | Type | Length/Range | Description |
---|---|---|---|
introduction | String | Max 512 chars | Group introduction |
announcement | String | Max 1024 chars | Group announcement |
portraitUrl | String | Max 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 profile/permission |
memProfilePerm | Number | Options:
| 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:
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,
}