logo
In-app Chat
On this page

Function Overview

2026-01-21

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.
setEventHandlerSet the event notification callbacks that need to be handled. If the eventHandler is set to [null], all the callbacks set previously will be cleared.
setLogConfigSet log related configuration.
setGeofencingConfigSet geofence-related configurations.
setCacheConfigSet cache related configuration.
loginLogin, you must log in before using all functions.
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.
onErrorThe callback for error information.
onTokenWillExpireA reminder callback that the token is about to expire.
onUserInfoUpdatedCallback for user information update.
onUserRuleUpdatedCallback of user rule changes.

Room functions

MethodDescription
createRoomCreate and join a room.
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.
onReceiveRoomMessageThe callback for receiving room message.
onRoomStateChangedevent callback when the room connection status changes.
onRoomMemberJoinedCallback when other members join the room.
onRoomMemberLeftCallback 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.
clearLocalFileCacheClear the local message cache of the current user.
queryLocalFileCacheQuery the local message cache of the current user.
exportLocalMessagesExample Export the local message of the current user.
importLocalMessagesExample Import the local message of the current user.
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.
downloadMediaFileDownload media file message content.
downloadMediaFileDownload media message content.
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.
onGroupMessageReceivedThe callback for receiving group message.
onPeerMessageReceivedThe callback for receiving peer-to-peer message.
onRoomMessageReceivedThe callback for receiving room message.
onMessageEditedThe callback for receiving edited message.
onMessagePinStatusChangedThe notification for receiving message pinned status changed.
onMessageRevokeReceivedThe callback for receiving revoke message.
onMessageSentStatusChangedThe callback for received message send status change.
onBroadcastMessageReceivedThe callback of the broadcast message received by all employees.
onMessageReactionsChangedThe callback of the reactions change.
onMessageDeletedCallback when the message is deleted.
onReceivePeerMessageThe callback for receiving peer-to-peer message.
onMessageRepliedCountChangedReply to the event that the number of message trees has changed.
onMessageRepliedInfoChangedThe reply information of a reply message is changed.
onReceiveGroupMessageThe callback for receiving group message.

Group functions

MethodDescription
createGroupCreate groups.
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.
onGroupStateChangedGroup state change notification callback.
onGroupAliasUpdatedGroup alias update notification callback.
onGroupNameUpdatedGroup name update notification callback.
onGroupAvatarUrlUpdatedGroup avatar URL update notification callback.
onGroupNoticeUpdatedNotification callback for group announcement updates.
onGroupMutedInfoUpdatedNotification callback for group mute info updates.
onGroupVerifyInfoUpdatedNotification callback for group verification mode update.
onGroupAttributesUpdatedGroup property update attributes callback.
onGroupMemberStateChangedGroup member state change notification callback.
onGroupMemberInfoUpdatedGroup member basic information change notification.
onGroupApplicationListChangedThis method will be called back when the group application list changes.
onGroupApplicationUpdatedThis 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.
onConversationChangedReceived notification callback for session update.
onConversationMessageReceiptChangedCallback for notifications of read updates for sessions that receive receipts.
onConversationSyncStateChangedReceived notification callback for synchronizing conv list from server.
onConversationsAllDeletedThe callback of all conversation deletion was received.
onMessageReceiptChangedThe notification callback for the read update of the message that received the receipt.
onConversationTotalUnreadMessageCountUpdatedNotification 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
onBlacklistChangedThis method will be called back when the blacklist is updated or changes occur.
onCallInvitationReceivedThe notification callback for the call invitation received by the invitee.
onCallInvitationCreatedThe notification callback for the call invitation created by the caller.
onCallInvitationCancelledThe notification callback received by the invitee to cancel the invitation.
onCallInvitationTimeoutCallback for notification of called call invitation timeout.
onCallInvitationAcceptedThe notification callback received by the inviter that invitee has accepted the invitation.
onCallInvitationRejectedThe inviter receives the notification callback that the invitee reject the invitation.
onCallInviteesAnsweredTimeoutCallback for notification of caller call invitation timeout.
onCallInvitationEndedCallback for notification of caller call invitation ended.
onCallUserStateChangedCall the notification of the user status in the invitation invitation.

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.
onFriendListChangedThis method will be called back when the friend list is updated or changes occur.
onFriendApplicationListChangedThis method will be called back when the friend application list changes.
onFriendApplicationUpdatedThe current method will be called when there is an update in the friend request list.
onFriendInfoUpdatedThis callback will be triggered when there is an update in the friend information.

Previous

FAQ

Next

Class

On this page

Back to top