logo
In-app Chat
Powered Byspreading
On this page

API overview


ZEGOCLOUD's In-app Chat provides you with the following Server APIs, please refer to Accessing Server APIs to call the following interface.

MethodDescriptionDefault Frequency Limit
Query user's online statusQuery the online status of a single user or multiple users.20 times/second
Query user informationThis API allows you to retrieve information for multiple users based on their user IDs. The response includes each user's name, avatar, and other extended fields.20 times/second
Batch register usersRegister ZEGOCLOUD Instant Messaging (ZIM) accounts for users.20 times/second
Modify user informationModify user information, including the nickname and avatar.20 times/second
Batch add friendsAdd up to 20 friends for a user without their consent.20 times/second
Batch send friend requestsSend friend requests to up to 20 users for a user.20 times/second
Batch delete friendsDelete up to 20 friends for a user in a one-way or two-way manner.20 times/second
Delete all friendsDelete all friends for a user in a one-way or-way manner.20 times/second
Query the friend listQuery the list of friends by page based on a user ID, including information such as the friend alias and friend relation creation time.20 times/second
Check friendshipCheck the friend relation between a user and up to 20 users.20 times/second
Change the alias of a friendChange the aliases of up to 20 friends for a user.20 times/second
Modify the attributes of a friendModify the attributes of a friend for a user.20 times/second
Batch block usersBlock up to 20 users for a user.20 times/second
Batch unblock usersUnblock up to 20 users for a user.20 times/second
Query the blocklistGet the list of all blocked friends based on a user ID by page.20 times/second
Check blockshipsCheck whether up to 20 users are on the target user's blacklist.20 times/second
MethodDescriptionDefault Frequency Limit
Obtain information about users in a roomObtain information about users in a room by room ID, including the number of users, user ID, and username.20 times/second
Remove user from the roomRemove specified users from the room.20 times/second
Destroy the roomDestroy a room.20 times/second
Query whether a user is in a roomQuery whether users are in a specified room.20 times/second
MethodDescriptionDefault Frequency Limit
Create a groupCreate a group20 times/second
Modify group specification limitsModify the following group settings: JoinMode, InviteMode, BeInvitedMode, and MemberCountLimit.20 times/second
Query group list in the appzim-QueryAppGroupList20 times/second
Query group member listGet the user list in a group based on the group ID.20 times/second
Remove group membersRemove users in the group by specifying their user IDs.20 times/second
Transfer the group ownershipTransfer the group ownership to a group member.1 time/second, group level limit
Add group membersAdd users to a specified group chat in batch.1 time/second, group level limit
Set nicknames of group membersChange the nicknames of up to 20 group members at a time in batch.1 time/second, group level limit
Set group member rolesSet roles for group members within the group.20 times/second
Mute a groupMute or unmute all members or certain roles in a group.20 times/second
Mute group membersMute or unmute specific members in a group.20 times/second
Disband a group chatDisband a group chat1 time/second, group level limit
MethodDescriptionDefault Frequency Limit
Send a one-to-one messageSend one-to-one messages to one or more users.20 times/second
Send group messagesSend messages to all online users in a group.10 times/second
Send room messagesSend messages to all online users in a room.10 times/second
Push message to all usersSend messages with specific content, such as text, images, etc., to all online users, including the sender of the message.1/second, limited to 100 times per 24 hours
Recall a one-to-one messageRecall a one-to-one message sent within two minutes.20 times/second
Recall a group messageRecall a group message sent within two minutes.20 times/second
Import one-to-one messagesImport historical one-to-one messages in chronological order from another instant messaging service to ZEGO Instant Messaging (ZIM).20 times/second
Import group messagesImport historical group messages in chronological order from another instant messaging service to ZEGOCLOUD Instant Messaging (ZIM).20 times/second
MethodDescriptionDefault Frequency Limit
Send a call invitationCreate a call invitation in general mode.20 times/second
Accept a call invitationAccept a call invitation for a user.20 times/second
Reject a call invitationReject a call invitation for a user.20 times/second
MethodDescriptionDefault Frequency Limit
Mute notifications for conversationsBatch mute notifications for one-to-one chats or group chats.20 times/second
Pin or unpin conversations to or from the topPin or unpin up to 20 conversations to or from the top for a user in batch.20 times/second
Query conversation listPaginate and fetch the all conversation list.20 times/second
Query the message list of one-on-one chatsPaginate and fetch the message list of a specific one-on-one chat for a specified user.20 times/second
Query the message list of group chatsPaginate and fetch the message list of a specific group chat.20 times/second

ZIMAudio Server

MethodDescriptionDefault Frequency Limit
Obtain a licenseObtain the license of the audio component.20 times/second

Third party callback

CallbackDescription
Login and logout callbackListen for user login and logout and implement the business logic, for example, counting online users.
Callback on call invitation sentAfter a call is created on the client, the business backend receives the call creation callback from the ZIM server to check whether the call is created successfully.
Callback on call invitation canceledWhen the following situations occur, the business backend can receive a callback from the ZIM server to cancel a call, which helps determine the call status:
  • The initiating user successfully cancels the call.
  • The initiating user proactively logs out or enters a logged-out state due to a timeout after successfully creating the call.
Callback on call invitation acceptedAfter the callee accepts the call invitation, the business server can receive the callback on the call invitation accepted by the In-app Chat Server to determine the success of the call invitation acceptance request.
Callback on call invitation rejectedAfter the callee rejects the call invitation, the business server can receive the callback on the call invitation rejected by the In-app Chat Server to determine the success of the call invitation request.
Callback on call invitation timed outAfter the call invitation is sent successfully, when the following situations occur, the business server can receive the call timeout callback from the In-app Chat Server to know the target user:
  • The callee has not answered until the timeout period configured in the business server is met.
  • The callee does not answer until the timeout period set when the call was created is met.
Callback on message not sent yetAfter setting this callback, when a user sends a message to a one-on-one chat, group chat or room chat, In-app Chat will initiate a request to your business server, and you can perform real-time operations on the message through the response.
Callback on message sentAfter the user sends a message to one-on-one chat, group chat, or room successfully or fails, the business server can receive the message sending callback from the In-app Chat server, and synchronize the message sent by the user to the business server in real time, and store it in the business server.

Next

Accessing Server APIs