Set group alias for specified user
This API sets a group alias for a specified user in a specified group. The alias only applies to that specific user. When new messages arrive while the user is offline, push notification titles will display the group alias if set. If no alias exists, the group name will be shown by default.
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/remarkname/set.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 with these parameters:
Parameter | Type | Required | Description |
---|---|---|---|
groupId | String | Yes | Group ID |
userId | String | Yes | Group member ID |
remarkName | String | Yes | Group alias (max 64 characters). Existing aliases will be overwritten. |
Request example
POST /entrust/group/remarkname/set.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
userId=123&groupId=456&remarkName=欢乐家长群
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
}