logo
In-app Chat
On this page

Function Overview

2026-01-23

ZEGO ZIM SDKs provide rich APIs for you to quickly build in app chat capabilities into your applications.

ZEGO ZIM SDKs are available for all major platforms, including Android, iOS, Mac, Windows, and Web.

MethodDescription
querySubscribedUserStatusListThis command is used to query the user status subscription list of the current user.
queryUsersStatusQuery the user statuses of other users.
subscribeUsersStatusSubscribe to the user status of other users
unsubscribeUsersStatusThis command is used to batch unsubscribe the target users in the current user subscription list.
updateUserCustomStatusIt is used to update the user-defined status.
updateUserOfflinePushRuleModify the custom rule of offline push
querySelfUserInfoQuery user information and user rules.
createCreate a ZIM instance.
createCreate a ZIM instance.
getVersionGets the SDK's version number.
getInstanceGet the ZIM singleton object.
onRegister to listen for events.
offDelete listener event.
setLogConfigSet log related configuration.
setGeofencingConfigSet geofence-related configurations.
loginLogin, you must log in before using all functions.
loginLogin, you must log in before using all functions.
renewTokenUpdate the authentication token.
queryUsersInfoQuery user information.
updateUserNameUpdate user's user name.
updateUserAvatarUrlUpdate user's avatar URL.
updateUserExtendedDataUpdate user's user extended data.
uploadLogUpload log and call after setting up log path.
logoutLog out of ZIM service.
destroyDestroy the ZIM instance.
errorThe callback for error information.
tokenWillExpireA reminder callback that the token is about to expire.
userInfoUpdatedCallback for user information update.
userRuleUpdatedCallback of user rule changes.

Room functions

MethodDescription
queryRoomMembersQuery the information of up to ten users in the specified room.
setRoomMembersAttributesSet room member attributes (use this for all additions and changes).
queryRoomMembersAttributesBatch query the room user attributes of the members in the room.
queryRoomMemberAttributesListpaginate the room user properties that have room property members in the room.
createRoomCreate a room with advanced settings
enterRoomEnter the room. If the room does not exist, it will be created automatically.
switchRoomSwitch from one room to another. If the room does not exist, it will decide whether to create the corresponding room based on the passed parameters.
joinRoomJoin a room.
leaveRoomLeave a room.
leaveAllRoomLeave all rooms entered.
queryRoomMemberListQuery the list of members in the room.
queryRoomOnlineMemberCountQuery the number of online members in the room.
queryRoomAllAttributesQuery all properties of the room.
setRoomAttributesSet room attributes (use this for all additions and changes).
deleteRoomAttributesDelete room attributes.
beginRoomAttributesBatchOperationOpen combination room attribute operation.
endRoomAttributesBatchOperationComplete the property operation of the combined room.
receiveRoomMessageThe callback for receiving room message.
roomStateChangedevent callback when the room connection status changes.
roomMemberJoinedCallback when other members join the room.
roomMemberLeftCallback when other members leave the room.

Message functions

MethodDescription
cancelSendingMessageCancels sending of media message.
editMessageEdit message.
pinMessagePin or unpin message.
sendMessagesend message.
sendMediaMessageSend media messages.
insertMessageToLocalDBInsert a message to the local DB.
sendConversationMessageReceiptReadSets all received receipts for the conversation as read.
sendMessageReceiptsReadSet the receipt of a batch of messages to become read.
queryMessageReceiptsInfoQuery the receipt information of a batch of messages.
queryGroupMessageReceiptReadMemberListQuery the list of read members of the group
queryGroupMessageReceiptUnreadMemberListQuery the list of read members of the group.
searchLocalMessagesSearch local message list.
searchLocalConversationsSearch local conversations on local messages.
searchGlobalLocalMessagesSearch global local message list.
replyMessagesend reply message.
queryMessageRepliedListQuery the reply list.
sendMediaMessageSend media messages.
sendPeerMessageSend peer-to-peer messages.
sendRoomMessageSend room messages.
sendGroupMessageSend group messages.
queryHistoryMessageQuery historical messages.
queryPinnedMessageListQuery pinned message list.
queryMessagesQuery messages based on the message seq list.
deleteAllConversationMessagesDelete all messages for all sessions.
queryCombineMessageDetailquery combine message detail
revokeMessagerevoke message.
deleteMessagesdelete message.
addMessageReactionadd message reaction
deleteMessageReactiondelete message reaction
queryMessageReactionUserListquery message reaction userlist
deleteAllMessageDelete all message.
updateMessageLocalExtendedDataUpdate the local expandable field of the message.
groupMessageReceivedThe callback for receiving group message.
peerMessageReceivedThe callback for receiving peer-to-peer message.
roomMessageReceivedThe callback for receiving room message.
messageEditedThe callback for receiving edited message.
messagePinStatusChangedThe notification for receiving message pinned status changed.
messageRevokeReceivedThe callback for receiving revoke message.
messageSentStatusChangedThe callback for received message send status change.
broadcastMessageReceivedThe callback of the broadcast message received by all employees.
messageReactionsChangedThe callback of the reactions change.
messageDeletedCallback when the message is deleted.
receivePeerMessageThe callback for receiving peer-to-peer message.
messageRepliedCountChangedReply to the event that the number of message trees has changed.
messageRepliedInfoChangedThe reply information of a reply message is changed.
receiveGroupMessageThe callback for receiving group message.
onMessageAttachedThe incoming message object is given a localMessgeID and returned.
onMediaUploadingProgressProgress callback for sending media messages.
onMessageAttachedThe incoming message object is given a localMessgeID and returned.
onMultipleMediaUploadingProgressProgress callback for sending multiple messages.

Group functions

MethodDescription
searchLocalGroupsSearch local groups.
searchLocalGroupMembersSearch local group members.
createGroupCreate a group with the andvanced info such as group attributes and group notice.
joinGroupjoin a goup.
leaveGroupLeave the group.
dismissGroupDisband the group.
kickGroupMemberskick some members out of the group.
inviteUsersIntoGroupinvite some members into the group.
transferGroupOwnerTransfer the group owner.
updateGroupAliasUpdate the group alias.
updateGroupNameUpdate the group name.
muteGroupMute a group
muteGroupMembersMute group members.
updateGroupAvatarUrlUpdate the group avatar URL.
updateGroupNoticeUpdate group announcements.
updateGroupJoinModeUpdate group verification mode.
updateGroupInviteModeUpdate group verification mode.
acceptGroupInviteApplicationAccept an application to invite to the group.
acceptGroupJoinApplicationAccept an application to join the group.
queryGroupApplicationListQuery the group application list.
rejectGroupInviteApplicationReject an application to invite to the group.
rejectGroupJoinApplicationReject an application to join the group.
sendGroupInviteApplicationsSend an application to invite the group.
sendGroupJoinApplicationSend an application to join the group.
updateGroupBeInviteModeUpdate group verification mode.
queryGroupInfoQuery group information.
queryGroupListQuery group list.
setGroupAttributesAdd or update group attributes.
deleteGroupAttributesDelete group attribute.
queryGroupAttributesQuery group attributes by keys.
queryGroupAllAttributesQuery all attributes of the group.
setGroupMemberRoleSet the group member role.
setGroupMemberNicknameSet group member nickname.
queryGroupMemberInfoQuery group member information.
queryGroupMemberListQuery the list of group members.
queryGroupMemberMutedListQuery the list of group muted members.
queryGroupMemberCountQuery the number of group members in a specified group.
groupStateChangedGroup state change notification callback.
groupAliasUpdatedGroup alias update notification callback.
groupNameUpdatedGroup name update notification callback.
groupAvatarUrlUpdatedGroup avatar URL update notification callback.
groupNoticeUpdatedNotification callback for group announcement updates.
groupMutedInfoUpdatedNotification callback for group mute info updates.
groupVerifyInfoUpdatedNotification callback for group verification mode update.
groupAttributesUpdatedGroup property update attributes callback.
groupMemberStateChangedGroup member state change notification callback.
groupMemberInfoUpdatedGroup member basic information change notification.
groupApplicationListChangedThis method will be called back when the group application list changes.
groupApplicationUpdatedThis method will be called back when the group application list changes.

Conversation functions

MethodDescription
queryConversationQuery a conversation by conversation ID and conversation type.
queryConversationListQuery the conversation list.
queryConversationListQuery the conversation list by filter options.
queryConversationPinnedListQuery the conversation pinned list.
queryConversationTotalUnreadMessageCountQuery the conversations total unread message count by config.
updateConversationPinnedStateModify the conversation pinned state.
deleteAllConversationsdelete all conversations.
deleteConversationdelete the conversation.
setConversationDraftSet a conversation draft.
clearConversationTotalUnreadMessageCountclear all conversations unreads.
clearConversationUnreadMessageCountclear session unreads.
setConversationMarkSet or unset conversation marks.
setConversationNotificationStatusSet the conversation notification state.
conversationChangedReceived notification callback for session update.
conversationMessageReceiptChangedCallback for notifications of read updates for sessions that receive receipts.
conversationSyncStateChangedReceived notification callback for synchronizing conv list from server.
conversationsAllDeletedThe callback of all conversation deletion was received.
messageReceiptChangedThe notification callback for the read update of the message that received the receipt.
conversationTotalUnreadMessageCountUpdatedNotification callback for session total unread updates.

Call Invitation functions

MethodDescription
callInviteInitiate a call invitation.
callJoinJoin an advanced mode call, or switch the main device for the advanced mode call (multi-terminal login only).
callCancelCancel the call invitation.
callAcceptAccept the call invitation.
callRejectReject the call invitation.
callQuitReject the call invitation.
callEndEnd the call invitation.
callingInviteInvite other users to join the call invitation
queryCallInvitationListQuery call invitation list
blacklistChangedThis method will be called back when the blacklist is updated or changes occur.
callInvitationReceivedThe notification callback for the call invitation received by the invitee.
callInvitationCreatedThe notification callback for the call invitation created by the caller.
callInvitationCancelledThe notification callback received by the invitee to cancel the invitation.
callInvitationTimeoutCallback for notification of called call invitation timeout.
callInvitationAcceptedThe notification callback received by the inviter that invitee has accepted the invitation.
callInvitationRejectedThe inviter receives the notification callback that the invitee reject the invitation.
callInviteesAnsweredTimeoutCallback for notification of caller call invitation timeout.
callInvitationEndedCallback for notification of caller call invitation ended.
callUserStateChangedCall the notification of the user status in the invitation invitation.

Offline Push functions

MethodDescription
getInstanceGet the ZPNs instance.
registerThis method is used to register vendor offline push.
unregisterCall this method to de-register when offline push is not required.

Blacklist functions

MethodDescription
addUsersToBlacklistAdd users to blacklist.
removeUsersFromBlacklistRemove the user from the blacklist.
queryBlacklistQuery the blacklist.
checkUserIsInBlacklistCheck if the user is on the blacklist.

Friend functions

MethodDescription
addFriendAdd friends directly.
sendFriendApplicationSend a friend application.
deleteFriendsDelete friends.
checkFriendsRelationCheck friend relationships.
updateFriendAliasUpdate friend alias.
updateFriendAttributesUpdate friend attributes.
acceptFriendApplicationAccept to friend request.
rejectFriendApplicationAccept to friend request.
queryFriendsInfoQuery friend information in batches.
queryFriendListQuery the friends list.
queryFriendApplicationListQuery the friend application list.
searchLocalFriendsSearch local friends.
friendListChangedThis method will be called back when the friend list is updated or changes occur.
friendApplicationListChangedThis method will be called back when the friend application list changes.
friendApplicationUpdatedThe current method will be called when there is an update in the friend request list.
friendInfoUpdatedThis callback will be triggered when there is an update in the friend information.

Previous

FAQ

Next

Class

On this page

Back to top