In-app Chat
On this page

Function Overview

2026-07-24

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
getVersionGets the SDK's version number.
createCreate a ZIM instance.
getInstanceGet the ZIM singleton object.
setAdvancedConfigSet ZIM advanced configuration.
setGeofencingConfigSet geofence-related configurations.
setLogConfigSet log related configuration.
setCacheConfigSet cache related configuration.
setCustomDynamicLibPathSet the custom dynamic library path.
destroyDestroy the ZIM instance.
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.
uploadLogUpload log and call after setting up log path.
loginLogin, you must log in before using all functions.
logoutLog out of ZIM service.
renewTokenUpdate the authentication token.
callExperimentalAPICall the experimental API.
updateUserNameUpdate user's user name.
updateUserAvatarUrlUpdate user's avatar URL.
updateUserExtendedDataUpdate user's user extended data.
updateUserOfflinePushRuleUpdate user's custom rule of offline push.
updateUserCustomStatusIt is used to update the user-defined status.
updateUserCustomStatusUpdate user's custom status.
updateUserBadgeUpdate the number of iOS offline notification badges.
queryUsersInfoQuery user information.
queryUsersStatusQuery the user statuses of other users.
querySelfUserInfoQuery user information and user rules.
subscribeUsersStatusSubscribe to the user status of other users
unsubscribeUsersStatusThis command is used to batch unsubscribe the target users in the current user subscription list.
querySubscribedUserStatusListThis command is used to query the user status subscription list of the current user.
onErrorThe callback for error information.
onExperimentalEventReceivedExperimental API callback.
onTokenWillExpireA reminder callback that the token is about to expire.
onConnectionStateChangedThe event callback when the connection state changes.
onUserInfoUpdatedIn the multi-terminal login scenario, after the user modifies their information on device A, other online multi-terminal devices will receive this callback. For offline devices, after the user goes online, they need to call the [queryUsersInfo] interface to actively query user information.
onUserRuleUpdatedTriggered when the user rule changes.
onUserStatusUpdatedUser online status change notification.

Conversation functions

MethodDescription
queryConversationListQuery the conversation list.
queryConversationListQuery the conversation list.
queryConversationQuery a conversation by conversation ID and conversation type.
queryConversationPinnedListQuery the conversation pinned list.
updateConversationPinnedStateModify the conversation pinned state.
deleteConversationdelete the conversation.
deleteAllConversationsdelete all conversations.
clearConversationUnreadMessageCountclear session unreads.
clearConversationTotalUnreadMessageCountclear all conversations unreads.
queryConversationTotalUnreadMessageCountQuery the conversations total unread message count by config.
setConversationNotificationStatusSet the conversation notification state.
sendConversationMessageReceiptReadSets all received receipts for the conversation as read.
setConversationDraftSet a conversation draft.
setConversationMarkSet the conversation marked status.
setConversationMessageDestructDurationSet the timed message self-destruction duration for a conversation.
searchLocalConversationsSearch local conversations on local messages.
onConversationChangedReceived notification callback for session update.
onConversationTotalUnreadMessageCountUpdatedReceived notification callback for session update.
onConversationMessageReceiptChangedReceived notification callback when the message receiver has read this receipt message.
onConversationsAllDeletedWhen multiple login ends delete all sessions, the local end triggers the callback to notify the local end that all sessions are deleted.
onConversationSyncStateChangedNotification of synchronization status change events between the conversation list and the server

Message functions

MethodDescription
sendMessagesend message.
downloadMediaFileDownload media file message content.
queryHistoryMessageQuery historical messages.
queryMessagesQuery messages based on the message seq list.
deleteMessagesdelete message.
deleteAllMessageDelete all message.
deleteAllConversationMessagesDelete all messages for all conversations.
insertMessageToLocalDBInsert a message to the local DB.
sendMessageReceiptsReadSet the receipt of a batch of messages to become read.
queryMessageReceiptsInfoQuery the receipt information of a batch of messages.
revokeMessagerevoke message.
updateMessageLocalExtendedDataUpdate the local expandable field of the message.
editMessageEdit message.
cancelSendingMessageCancels sending of media message.
searchLocalMessagesSearch local message list.
searchGlobalLocalMessagesSearch global local message list.
addMessageReactionadd message reaction
addMessageReactionadd message reaction
deleteMessageReactiondelete message reaction
deleteMessageAllReactionsDelete all of your reactions under this message
queryMessageReactionUserListquery message reaction userlist
queryCombineMessageDetailquery combine message detail
replyMessagesend reply message.
queryMessageRepliedListQuery message replied list.
pinMessagePin or unpin message.
pinMessagePin message.
queryPinnedMessageListQuery pinned message list.
queryLocalFileCacheQuery the local message cache of the current user.
clearLocalFileCacheClear the local message cache of the current user.
onPeerMessageReceivedThe callback for receiving peer-to-peer message.
onRoomMessageReceivedThe callback for receiving room message.
onGroupMessageReceivedThe callback for receiving group message.
onMessageReceivedThe callback for receiving message.
onBroadcastMessageReceivedThe callback for receiving broadcast message.
onMessageSentStatusChangedThe callback for message sent status changed.
onMessageReceiptChangedReceived notification callback when the message receiver confirms that the message has been read.
onMessageRevokeReceivedReceived notification callback when some one else sends a message and then revoke a message sent by themselves.
onMessageReactionsChangedThe callback is received when reactions change
onMessageReactionsChangedThe callback is received when reactions change
onMessageDeletedThe callback is received when a message is deleted.
onMessageRepliedInfoChangedThe callback is received when the message replied information changes.
onMessageRepliedCountChangedThe callback is received when the message replied count changes.
onMessageEditedThe callback is received when a message is edited.
onMessagePinStatusChangedThe callback is received when a message is pinned.

Room functions

MethodDescription
createRoomCreate and join a room.
createRoomCreate a room with advanced settings
joinRoomJoin a room.
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.
leaveRoomLeave a room.
leaveAllRoomLeave all rooms entered.
queryRoomMemberListQuery the list of members in the room.
queryRoomMembersQuery the information of the specified userID in the specified room.
queryRoomOnlineMemberCountQuery the number of online members in 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.
queryRoomAllAttributesQuery all properties of the 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.
onRoomStateChangedThe event callback when the room connection status changes.
onRoomMemberJoinedCallback when other members join the room.
onRoomMemberLeftCallback when other members leave the room.
onRoomAttributesUpdatedEvent callback when the room attributes changes.
onRoomAttributesBatchUpdatedEvent callback when the room attributes batch changes.
onRoomMemberAttributesUpdatedEvent callback when the room member attributes changes.

Group functions

MethodDescription
createGroupCreate groups.
createGroupCreate a group with the andvanced info such as group attributes and group notice.
dismissGroupDismiss the group.
joinGroupJoin a group.
leaveGroupLeave the group.
inviteUsersIntoGroupinvite some members into the group.
kickGroupMemberskick some members out of the group.
transferGroupOwnerTransfer the group owner.
queryGroupInfoQuery group information.
queryGroupMemberInfoQuery group member information.
queryGroupListQuery the group list.
queryGroupListQuery the group list.
queryGroupMemberListQuery the list of group members.
queryGroupMemberCountQuery the number of group members in a specified group.
updateGroupNameUpdate the group name.
updateGroupAvatarUrlUpdate the group avatar URL.
updateGroupNoticeUpdate group announcements.
updateGroupAliasUpdate the group alias.
updateGroupJoinModeUpdate group verification mode.
updateGroupInviteModeUpdate group verification mode.
updateGroupBeInviteModeUpdate group verification mode.
setGroupAttributesAdd or update group attributes.
deleteGroupAttributesDelete group attributes.
queryGroupAttributesQuery group attributes by keys.
queryGroupAllAttributesQuery all attributes of the group.
setGroupMemberRoleSet the group member role.
setGroupMemberNicknameSet the group member nickname.
muteGroupMute a group.
muteGroupMembersMute group members.
queryGroupMemberMutedListQuery the list of group muted members.
queryGroupMessageReceiptReadMemberListQuery the list of group message read members.
queryGroupMessageReceiptUnreadMemberListQuery the list of group message unread members.
queryGroupMessageReceiptMemberListQuery the receipt member list of a group message.
searchLocalGroupsSearch local groups.
searchLocalGroupMembersSearch local group members.
sendGroupJoinApplicationSend an application to join the group.
acceptGroupJoinApplicationAccept an application to join the group.
rejectGroupJoinApplicationReject an application to join the group.
sendGroupInviteApplicationsSend an application to invite the group.
acceptGroupInviteApplicationAccept an application to invite to the group.
rejectGroupInviteApplicationReject an application to invite to the group.
queryGroupApplicationListQuery the group application list.
onGroupStateChangedEvent callback when the group state changes.
onGroupNameUpdatedEvent callback when the group name changes.
onGroupAvatarUrlUpdatedEvent callback when the group avatar changes.
onGroupNoticeUpdatedEvent callback when the group notice changes.
onGroupAliasUpdatedEvent callback when the group alias changes.
onGroupAttributesUpdatedEvent callback when the group attributes change.
onGroupMutedInfoUpdatedEvent callback when the group is muted.
onGroupVerifyInfoUpdatedEvent callback when the group verification information changes.
onGroupMemberStateChangedEvent callback when the group member status changes.
onGroupMemberInfoUpdatedEvent callback when the group member information changes.
onGroupApplicationListChangedEvent callback when the group application list changes.
onGroupApplicationUpdatedEvent callback when the group application information changes.

Call Invitation functions

MethodDescription
callInviteInitiate a call invitation.
callCancelCancel the call invitation.
callAcceptAccept the call invitation.
callRejectReject the call invitation.
callingInviteInvite other users to join the call invitation.
callJoinJoin an advanced mode call, or switch the main device for the advanced mode call (multi-terminal login only).
callQuitQuit the current call invitation.
callEndEnd the call invitation.
queryCallInvitationListQuery the call invitation list.
onCallInvitationCreatedEvent callback when the call invitation is created.
onCallInvitationReceivedEvent callback when the call invitation is received.
onCallInvitationCancelledEvent callback when the call invitation is cancelled.
onCallInvitationEndedEvent callback when the call invitation is ended.
onCallInvitationTimeoutEvent callback when the call invitation times out.
onCallUserStateChangedEvent callback when the call invitation user status changes.

Friend functions

MethodDescription
addFriendAdd friends directly.
deleteFriendsDelete friends.
checkFriendsRelationCheck friend relationships.
updateFriendAliasUpdate friend alias.
updateFriendAttributesUpdate friend attributes.
queryFriendsInfoQuery friend information in batches.
queryFriendListQuery the friends list.
searchLocalFriendsSearch local friends.
sendFriendApplicationSend a friend application.
acceptFriendApplicationAccept a friend application.
rejectFriendApplicationReject a friend application.
queryFriendApplicationListQuery the friend application list.
onFriendListChangedEvent callback when the friend list changes.
onFriendInfoUpdatedEvent callback when the friend information changes.
onFriendApplicationListChangedEvent callback when the friend application list changes.
onFriendApplicationUpdatedEvent callback when the friend application information changes.

Blacklist functions

MethodDescription
addUsersToBlacklistAdd users to the blacklist.
removeUsersFromBlacklistRemove the user from the blacklist.
queryBlacklistQuery the blacklist.
checkUserIsInBlacklistCheck if the user is on the blacklist.
onBlacklistChangedEvent callback when the blacklist changes.

Community functions

MethodDescription
createCommunityCreate a community.
dismissCommunityDismiss a community.
joinCommunityJoin a community.
leaveCommunityLeave a community.
inviteUsersIntoCommunityInvite users into a community.
kickCommunityMembersKick members from a community.
queryCommunityListQuery the community list.
updateCommunityNameUpdate the community name.
updateCommunityAvatarUrlUpdate the community avatar URL.
updateCommunityNoticeUpdate the community notice.
setCommunityAttributesSet community attributes.
deleteCommunityAttributesDelete community attributes.
setCommunityNotificationStatusSet the community notification status.
queryCommunityInfoQuery community information.
updateCommunityMemberRoleUpdate a community member's role.
transferCommunityOwnerTransfer the community owner.
queryCommunityMemberListQuery the community member list.
queryCommunityMembersQuery specific community members' information.
createCommunityChannelCreate a community channel.
dismissCommunityChannelDismiss a community channel.
updateCommunityChannelNameUpdate the community channel name.
updateCommunityChannelAvatarUrlUpdate the community channel avatar URL.
updateCommunityChannelNoticeUpdate the community channel notice.
setCommunityChannelAttributesSet community channel attributes.
deleteCommunityChannelAttributesDelete community channel attributes.
queryCommunityChannelsInfoQuery community channel information.
queryCommunityChannelListQuery the community channel list.
muteCommunityChannelsMute community channels.
muteCommunityMembersMute community members.
onCommunityListChangedReceived notification callback for community list changed.
onCommunityInfoUpdatedReceived notification callback for community info updated.
onCommunityMemberStateChanged.
onCommunityMemberInfoUpdated.
onCommunityChannelListChangedReceived notification callback for community channel list changed.
onCommunityChannelInfoUpdatedReceived notification callback for community info updated.

Previous

FAQ

Next

Class

On this page

Back to top