Set friend request verification level
Set friend request verification level
Enable the Service
Before calling this API, enable the profile hosting service by submitting a ticket.
Request method
POST: https://data center domain/friend/permission/set.json
Rate limit: 100 requests per second (Note: Counts by batch size. Setting 10 users at once counts as 10 API calls)
Signature rules: All server API requests require signature verification. See API request signature.
Request parameters
The HTTP request body uses application/x-www-form-urlencoded
format with these parameters:
Parameter | Type | Required | Description |
---|---|---|---|
userIds | String[] | Yes | User ID list (max 100 users per request) |
permissionType | String | Yes | 1. Anyone can add directly; 2. Require approval; 3. Block all friend requests |
Request example
POST /friend/permission/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
userIds=id1,id2,id3,id4&permissionType=1
Response
The HTTP response body contains a JSON object with this structure:
Field | Type | Description |
---|---|---|
code | Number | Status code (200 for success) |
Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 200,
}