Query friend request verification level
Query 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/get.json
Rate limit: 100 requests per second (Note: Batch queries count as multiple calls. For example, querying 10 users at once counts as 10 API calls)
Signature rules: All server API requests require signature verification. See API request signature for details.
Body parameters
The HTTP request body uses application/x-www-form-urlencoded
format and supports the following form parameters:
Parameter | Type | Required | Description |
---|---|---|---|
userIds | String[] | Yes | User ID list (maximum 100 users per request) |
Request example
POST /friend/permission/get.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
Response
The HTTP response body contains a JSON object with the following structure:
Field | Type | Description |
---|---|---|
code | Number | Status code (200 indicates success) |
permissionSettings | Object[] | Query result list |
permissionSettings[i].userId | String | User ID |
permissionSettings[i].type | Number | 1. Anyone can add directly; 2. Requires approval; 3. No one can add |
Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 200,
"permissionSettings":[
{
"userId":"id1",
"type":1
},
{
"userId":"id2",
"type":2
},
{
"userId":"id3",
"type":3
},
{
"userId":"id4",
"type":1
}
]
}