SendFriendApplication
https://zim-api.zego.im/
By calling this API, you can batch send friend requests to up to 20 other users for a user. If you need to increase the limit (up to 50), please contact ZEGOCLOUD Technical Support.
When a user is already a one-way friend of the target user, if you call this API to send a friend request to the target user, the target user will directly become a friend of the user.
For example, users A and B were originally two-way friends. A deleted B in one-way mode, so A is a one-way friend of B, and B is not a friend of A. After calling this API to send a friend request to B, B directly becomes a friend of A without B's consent.
Each user can have a maximum of 3000 friends.
After sending a friend request, the client of the target user will receive the request notification through the following ZIM SDK callback interface:
| iOS | Android | macOS | Windows |
|---|---|---|---|
| friendApplicationListChanged | onFriendApplicationListChanged | friendApplicationListChanged | onFriendApplicationListChanged |
| Web | Mini Program | Flutter | React Native |
|---|---|---|---|
| friendApplicationListChanged | friendApplicationListChanged | onFriendApplicationListChanged | friendApplicationListChanged |
| uni-app | uni-app x | HarmonyOS |
|---|---|
| friendApplicationListChanged | friendApplicationListChanged |
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: [SendFriendApplication]
API prototype parameter
https://zim-api.zego.im/?Action=SendFriendApplication
💡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
