logo
In-app Chat
On this page

Function overview

2026-01-23

ZEGOCLOUD's ZIM SDKs provide rich APIs for you to quickly build the in-app chat feature into your applications.

The ZIM SDK now supports all major platforms and frameworks, including Android, iOS, Mac, Windows, Web, and Flutter.

MethodDescription
getVersionGets the SDK's version number.
createCreate a ZIM instance.
setLogConfigSet log related configuration.
setCacheConfigSet cache related configuration.
loginLogin, you must log in before using all functions.
renewTokenUpdate the authentication token.
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.

Room functions

MethodDescription
createRoomCreate and join a room.
enterRoomEnter the room. If the room does not exist, it will be created automatically.
joinRoomJoin a room.
leaveRoomLeave a room.
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
sendMediaMessageSend media messages.
downloadMediaFileDownload media message content.
sendPeerMessageSend peer-to-peer messages.
sendRoomMessageSend room messages.
sendGroupMessageSend group message.
queryHistoryMessageQuery historical messages.
deleteMessagesDelete message.
deleteAllMessageDelete all message.
onReceivePeerMessageThe callback for receiving one-to-one message.
onReceiveRoomMessageThe callback for receiving in-room message
onReceiveGroupMessageThe callback for receiving group message.

Group functions

MethodDescription
createGroupCreate groups.
joinGroupjoin a goup.
leaveGroupLeave the group.
dismissGroupDisband the group.
inviteUsersIntoGroupInvite users into the group.
kickGroupMemberskick some members out of the group.
transferGroupOwnerTransfer the group owner.
updateGroupNameUpdate the group name.
updateGroupNoticeUpdate group announcements.
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.
onGroupStateChangedGroup state change notification callback.
onGroupNameUpdatedGroup name update notification callback.
onGroupNoticeUpdatedNotification callback for group announcement updates.
onGroupAttributesUpdatedGroup property update attributes callback.
onGroupMemberStateChangedGroup member state change notification callback.
onGroupMemberInfoUpdatedGroup member basic information change notification.

Conversation functions

MethodDescription
queryConversationListQuery the conversation list.
deleteConversationDelete the conversation.
clearConversationUnreadMessageCountClear session unreads.
setConversationNotificationStatusSet the conversation notification state.
onConversationChangedReceived notification callback for session update.
onConversationTotalUnreadMessageCountUpdatedNotification callback for session total unread updates.

Call Invitation functions

MethodDescription
callInviteInitiate a call invitation.
callCancelCancel the call invitation.
callAcceptAccept the call invitation.
callRejectReject the call invitation.
onCallInvitationReceivedThe notification callback for the call invitation received by the invitee.
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.

Previous

FAQ

On this page

Back to top