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.
SDK Initialization Related Functions
| Method | Description |
|---|---|
| getVersion | Gets the SDK's version number. |
| create | Create a ZIM instance. |
| getInstance | Get the ZIM singleton object. |
| setAdvancedConfig | Set ZIM advanced configuration. |
| setGeofencingConfig | Set geofence-related configurations. |
| setLogConfig | Set log related configuration. |
| setCacheConfig | Set cache related configuration. |
| setCustomDynamicLibPath | Set the custom dynamic library path. |
| destroy | Destroy the ZIM instance. |
| setEventHandler | Set the event notification callbacks that need to be handled. If the eventHandler is set to [null], all the callbacks set previously will be cleared. |
| uploadLog | Upload log and call after setting up log path. |
| login | Login, you must log in before using all functions. |
| logout | Log out of ZIM service. |
| renewToken | Update the authentication token. |
| callExperimentalAPI | Call the experimental API. |
| updateUserName | Update user's user name. |
| updateUserAvatarUrl | Update user's avatar URL. |
| updateUserExtendedData | Update user's user extended data. |
| updateUserOfflinePushRule | Update user's custom rule of offline push. |
| updateUserCustomStatus | It is used to update the user-defined status. |
| updateUserCustomStatus | Update user's custom status. |
| updateUserBadge | Update the number of iOS offline notification badges. |
| queryUsersInfo | Query user information. |
| queryUsersStatus | Query the user statuses of other users. |
| querySelfUserInfo | Query user information and user rules. |
| subscribeUsersStatus | Subscribe to the user status of other users |
| unsubscribeUsersStatus | This command is used to batch unsubscribe the target users in the current user subscription list. |
| querySubscribedUserStatusList | This command is used to query the user status subscription list of the current user. |
| onError | The callback for error information. |
| onExperimentalEventReceived | Experimental API callback. |
| onTokenWillExpire | A reminder callback that the token is about to expire. |
| onConnectionStateChanged | The event callback when the connection state changes. |
| onUserInfoUpdated | In 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. |
| onUserRuleUpdated | Triggered when the user rule changes. |
| onUserStatusUpdated | User online status change notification. |
Conversation functions
| Method | Description |
|---|---|
| queryConversationList | Query the conversation list. |
| queryConversationList | Query the conversation list. |
| queryConversation | Query a conversation by conversation ID and conversation type. |
| queryConversationPinnedList | Query the conversation pinned list. |
| updateConversationPinnedState | Modify the conversation pinned state. |
| deleteConversation | delete the conversation. |
| deleteAllConversations | delete all conversations. |
| clearConversationUnreadMessageCount | clear session unreads. |
| clearConversationTotalUnreadMessageCount | clear all conversations unreads. |
| queryConversationTotalUnreadMessageCount | Query the conversations total unread message count by config. |
| setConversationNotificationStatus | Set the conversation notification state. |
| sendConversationMessageReceiptRead | Sets all received receipts for the conversation as read. |
| setConversationDraft | Set a conversation draft. |
| setConversationMark | Set the conversation marked status. |
| setConversationMessageDestructDuration | Set the timed message self-destruction duration for a conversation. |
| searchLocalConversations | Search local conversations on local messages. |
| onConversationChanged | Received notification callback for session update. |
| onConversationTotalUnreadMessageCountUpdated | Received notification callback for session update. |
| onConversationMessageReceiptChanged | Received notification callback when the message receiver has read this receipt message. |
| onConversationsAllDeleted | When multiple login ends delete all sessions, the local end triggers the callback to notify the local end that all sessions are deleted. |
| onConversationSyncStateChanged | Notification of synchronization status change events between the conversation list and the server |
Message functions
| Method | Description |
|---|---|
| sendMessage | send message. |
| downloadMediaFile | Download media file message content. |
| queryHistoryMessage | Query historical messages. |
| queryMessages | Query messages based on the message seq list. |
| deleteMessages | delete message. |
| deleteAllMessage | Delete all message. |
| deleteAllConversationMessages | Delete all messages for all conversations. |
| insertMessageToLocalDB | Insert a message to the local DB. |
| sendMessageReceiptsRead | Set the receipt of a batch of messages to become read. |
| queryMessageReceiptsInfo | Query the receipt information of a batch of messages. |
| revokeMessage | revoke message. |
| updateMessageLocalExtendedData | Update the local expandable field of the message. |
| editMessage | Edit message. |
| cancelSendingMessage | Cancels sending of media message. |
| searchLocalMessages | Search local message list. |
| searchGlobalLocalMessages | Search global local message list. |
| addMessageReaction | add message reaction |
| addMessageReaction | add message reaction |
| deleteMessageReaction | delete message reaction |
| deleteMessageAllReactions | Delete all of your reactions under this message |
| queryMessageReactionUserList | query message reaction userlist |
| queryCombineMessageDetail | query combine message detail |
| replyMessage | send reply message. |
| queryMessageRepliedList | Query message replied list. |
| pinMessage | Pin or unpin message. |
| pinMessage | Pin message. |
| queryPinnedMessageList | Query pinned message list. |
| queryLocalFileCache | Query the local message cache of the current user. |
| clearLocalFileCache | Clear the local message cache of the current user. |
| onPeerMessageReceived | The callback for receiving peer-to-peer message. |
| onRoomMessageReceived | The callback for receiving room message. |
| onGroupMessageReceived | The callback for receiving group message. |
| onMessageReceived | The callback for receiving message. |
| onBroadcastMessageReceived | The callback for receiving broadcast message. |
| onMessageSentStatusChanged | The callback for message sent status changed. |
| onMessageReceiptChanged | Received notification callback when the message receiver confirms that the message has been read. |
| onMessageRevokeReceived | Received notification callback when some one else sends a message and then revoke a message sent by themselves. |
| onMessageReactionsChanged | The callback is received when reactions change |
| onMessageReactionsChanged | The callback is received when reactions change |
| onMessageDeleted | The callback is received when a message is deleted. |
| onMessageRepliedInfoChanged | The callback is received when the message replied information changes. |
| onMessageRepliedCountChanged | The callback is received when the message replied count changes. |
| onMessageEdited | The callback is received when a message is edited. |
| onMessagePinStatusChanged | The callback is received when a message is pinned. |
Room functions
| Method | Description |
|---|---|
| createRoom | Create and join a room. |
| createRoom | Create a room with advanced settings |
| joinRoom | Join a room. |
| enterRoom | Enter the room. If the room does not exist, it will be created automatically. |
| switchRoom | Switch 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. |
| leaveRoom | Leave a room. |
| leaveAllRoom | Leave all rooms entered. |
| queryRoomMemberList | Query the list of members in the room. |
| queryRoomMembers | Query the information of the specified userID in the specified room. |
| queryRoomOnlineMemberCount | Query the number of online members in the room. |
| setRoomAttributes | Set room attributes (use this for all additions and changes). |
| deleteRoomAttributes | Delete room attributes. |
| beginRoomAttributesBatchOperation | Open combination room attribute operation. |
| endRoomAttributesBatchOperation | Complete the property operation of the combined room. |
| queryRoomAllAttributes | Query all properties of the room. |
| setRoomMembersAttributes | Set room member attributes (use this for all additions and changes). |
| queryRoomMembersAttributes | Batch query the room user attributes of the members in the room. |
| queryRoomMemberAttributesList | paginate the room user properties that have room property members in the room. |
| onRoomStateChanged | The event callback when the room connection status changes. |
| onRoomMemberJoined | Callback when other members join the room. |
| onRoomMemberLeft | Callback when other members leave the room. |
| onRoomAttributesUpdated | Event callback when the room attributes changes. |
| onRoomAttributesBatchUpdated | Event callback when the room attributes batch changes. |
| onRoomMemberAttributesUpdated | Event callback when the room member attributes changes. |
Group functions
| Method | Description |
|---|---|
| createGroup | Create groups. |
| createGroup | Create a group with the andvanced info such as group attributes and group notice. |
| dismissGroup | Dismiss the group. |
| joinGroup | Join a group. |
| leaveGroup | Leave the group. |
| inviteUsersIntoGroup | invite some members into the group. |
| kickGroupMembers | kick some members out of the group. |
| transferGroupOwner | Transfer the group owner. |
| queryGroupInfo | Query group information. |
| queryGroupMemberInfo | Query group member information. |
| queryGroupList | Query the group list. |
| queryGroupList | Query the group list. |
| queryGroupMemberList | Query the list of group members. |
| queryGroupMemberCount | Query the number of group members in a specified group. |
| updateGroupName | Update the group name. |
| updateGroupAvatarUrl | Update the group avatar URL. |
| updateGroupNotice | Update group announcements. |
| updateGroupAlias | Update the group alias. |
| updateGroupJoinMode | Update group verification mode. |
| updateGroupInviteMode | Update group verification mode. |
| updateGroupBeInviteMode | Update group verification mode. |
| setGroupAttributes | Add or update group attributes. |
| deleteGroupAttributes | Delete group attributes. |
| queryGroupAttributes | Query group attributes by keys. |
| queryGroupAllAttributes | Query all attributes of the group. |
| setGroupMemberRole | Set the group member role. |
| setGroupMemberNickname | Set the group member nickname. |
| muteGroup | Mute a group. |
| muteGroupMembers | Mute group members. |
| queryGroupMemberMutedList | Query the list of group muted members. |
| queryGroupMessageReceiptReadMemberList | Query the list of group message read members. |
| queryGroupMessageReceiptUnreadMemberList | Query the list of group message unread members. |
| queryGroupMessageReceiptMemberList | Query the receipt member list of a group message. |
| searchLocalGroups | Search local groups. |
| searchLocalGroupMembers | Search local group members. |
| sendGroupJoinApplication | Send an application to join the group. |
| acceptGroupJoinApplication | Accept an application to join the group. |
| rejectGroupJoinApplication | Reject an application to join the group. |
| sendGroupInviteApplications | Send an application to invite the group. |
| acceptGroupInviteApplication | Accept an application to invite to the group. |
| rejectGroupInviteApplication | Reject an application to invite to the group. |
| queryGroupApplicationList | Query the group application list. |
| onGroupStateChanged | Event callback when the group state changes. |
| onGroupNameUpdated | Event callback when the group name changes. |
| onGroupAvatarUrlUpdated | Event callback when the group avatar changes. |
| onGroupNoticeUpdated | Event callback when the group notice changes. |
| onGroupAliasUpdated | Event callback when the group alias changes. |
| onGroupAttributesUpdated | Event callback when the group attributes change. |
| onGroupMutedInfoUpdated | Event callback when the group is muted. |
| onGroupVerifyInfoUpdated | Event callback when the group verification information changes. |
| onGroupMemberStateChanged | Event callback when the group member status changes. |
| onGroupMemberInfoUpdated | Event callback when the group member information changes. |
| onGroupApplicationListChanged | Event callback when the group application list changes. |
| onGroupApplicationUpdated | Event callback when the group application information changes. |
Call Invitation functions
| Method | Description |
|---|---|
| callInvite | Initiate a call invitation. |
| callCancel | Cancel the call invitation. |
| callAccept | Accept the call invitation. |
| callReject | Reject the call invitation. |
| callingInvite | Invite other users to join the call invitation. |
| callJoin | Join an advanced mode call, or switch the main device for the advanced mode call (multi-terminal login only). |
| callQuit | Quit the current call invitation. |
| callEnd | End the call invitation. |
| queryCallInvitationList | Query the call invitation list. |
| onCallInvitationCreated | Event callback when the call invitation is created. |
| onCallInvitationReceived | Event callback when the call invitation is received. |
| onCallInvitationCancelled | Event callback when the call invitation is cancelled. |
| onCallInvitationEnded | Event callback when the call invitation is ended. |
| onCallInvitationTimeout | Event callback when the call invitation times out. |
| onCallUserStateChanged | Event callback when the call invitation user status changes. |
Friend functions
| Method | Description |
|---|---|
| addFriend | Add friends directly. |
| deleteFriends | Delete friends. |
| checkFriendsRelation | Check friend relationships. |
| updateFriendAlias | Update friend alias. |
| updateFriendAttributes | Update friend attributes. |
| queryFriendsInfo | Query friend information in batches. |
| queryFriendList | Query the friends list. |
| searchLocalFriends | Search local friends. |
| sendFriendApplication | Send a friend application. |
| acceptFriendApplication | Accept a friend application. |
| rejectFriendApplication | Reject a friend application. |
| queryFriendApplicationList | Query the friend application list. |
| onFriendListChanged | Event callback when the friend list changes. |
| onFriendInfoUpdated | Event callback when the friend information changes. |
| onFriendApplicationListChanged | Event callback when the friend application list changes. |
| onFriendApplicationUpdated | Event callback when the friend application information changes. |
Blacklist functions
| Method | Description |
|---|---|
| addUsersToBlacklist | Add users to the blacklist. |
| removeUsersFromBlacklist | Remove the user from the blacklist. |
| queryBlacklist | Query the blacklist. |
| checkUserIsInBlacklist | Check if the user is on the blacklist. |
| onBlacklistChanged | Event callback when the blacklist changes. |
Community functions
| Method | Description |
|---|---|
| createCommunity | Create a community. |
| dismissCommunity | Dismiss a community. |
| joinCommunity | Join a community. |
| leaveCommunity | Leave a community. |
| inviteUsersIntoCommunity | Invite users into a community. |
| kickCommunityMembers | Kick members from a community. |
| queryCommunityList | Query the community list. |
| updateCommunityName | Update the community name. |
| updateCommunityAvatarUrl | Update the community avatar URL. |
| updateCommunityNotice | Update the community notice. |
| setCommunityAttributes | Set community attributes. |
| deleteCommunityAttributes | Delete community attributes. |
| setCommunityNotificationStatus | Set the community notification status. |
| queryCommunityInfo | Query community information. |
| updateCommunityMemberRole | Update a community member's role. |
| transferCommunityOwner | Transfer the community owner. |
| queryCommunityMemberList | Query the community member list. |
| queryCommunityMembers | Query specific community members' information. |
| createCommunityChannel | Create a community channel. |
| dismissCommunityChannel | Dismiss a community channel. |
| updateCommunityChannelName | Update the community channel name. |
| updateCommunityChannelAvatarUrl | Update the community channel avatar URL. |
| updateCommunityChannelNotice | Update the community channel notice. |
| setCommunityChannelAttributes | Set community channel attributes. |
| deleteCommunityChannelAttributes | Delete community channel attributes. |
| queryCommunityChannelsInfo | Query community channel information. |
| queryCommunityChannelList | Query the community channel list. |
| muteCommunityChannels | Mute community channels. |
| muteCommunityMembers | Mute community members. |
| onCommunityListChanged | Received notification callback for community list changed. |
| onCommunityInfoUpdated | Received notification callback for community info updated. |
| onCommunityMemberStateChanged | . |
| onCommunityMemberInfoUpdated | . |
| onCommunityChannelListChanged | Received notification callback for community channel list changed. |
| onCommunityChannelInfoUpdated | Received notification callback for community info updated. |
