CheckFriendsRelation
https://zim-api.zego.im/
By calling this API, you can batch check the friend relationship between one user and up to 20 other users. If you need to increase the limit (up to 50), please contact ZEGOCLOUD Technical Support.
ZEGOCLOUD supports one-sided or two-sided checking of friend relationships. Taking checking the friend relationship between user A and target user B as an example:
- One-way check: Only check whether user A's friend list has user B.
- Two-way check: Check whether user A and user B have each other in their friend lists.
The results of checking friend relationships may include:
| Check Type | Relation | Description | |
|---|---|---|---|
| A's friend list has B | B's friend list has A | ||
| One-way | 1 | ✖ | Cannot confirm |
| 2 | ✔️ | Cannot confirm | |
| Two-way | 3 | ✖ | ✖ |
| 4 | ✔️ | ✖ | |
| 5 | ✖ | ✔️ | |
| 6 | ✔️ | ✔️ | |
The users corresponding to the parameters FromUserId and UserId have logged in to the ZIM service by calling the login method on the client, or have completed registration by calling the server-side API.
Request
Query Parameters
Possible values: [CheckFriendsRelation]
API prototype parameter
https://zim-api.zego.im/?Action=CheckFriendsRelation
💡Public parameter. Application ID, assigned by ZEGOCLOUD. Get it from the ZEGOCLOUD Admin Console.
💡Public parameter. A 16-character hexadecimal random string (hex encoding of 8-byte random number). Refer to Signature example for how to generate.
💡Public parameter. Current Unix timestamp, in seconds. Refer to Signature example for how to generate, with a maximum error of 10 minutes.
Possible values: [2.0]
Default value: 2.0
💡Public parameter. Signature version number.
💡Public parameter. Signature, used to verify the legitimacy of the request. Refer to Signing the requests for how to generate an API request signature.
- application/json
Responses
- 200
- application/json
