• UIKit
  • SDK
  • 서버 API
Chat/
SDK/
Flutter/
인터페이스 참고 문서/
SDK
  • Chat SDK 설치
    • 설치
  • Chat SDK 초기화
    • 초기화
  • 로그인 및 로그아웃
    • 로그인 및 로그아웃
  • 메시지
    • 메시지 개요
    • 메시지 보내기
    • 메시지 받기
    • 과거 메시지
    • 메시지 전달
    • 메시지 수정
    • 메시지 삽입
    • 메시지 삭제
    • 메시지 비우기
    • 메시지 철회
    • 온라인 메시지
    • 읽음 확인
    • 메시지 조회
    • 그룹 @ 메시지
    • 지향적 그룹 메시지
    • 알림 음소거
    • 메시지 확장
  • 대화
    • 대화 개요
    • 대화 목록
    • 대화 획득
    • 읽지 않은 대화 수
    • 대화 최상단 고정
    • 대화 삭제
    • 대화 초안
    • 대화 그룹
  • 그룹
    • 그룹 개요
    • 그룹 관리
    • 그룹 정보
    • 그룹 멤버 관리
    • 그룹 멤버 정보
    • 그룹 속성 사용자 정의
  • 사용자
    • 사용자 정보
    • 친구 관리
    • 친구 목록
    • 블록리스트
  • 오프라인 푸시
    • 오프라인 푸시
  • 시그널링
    • 시그널링 관리
  • 국부 검색
    • 메시지 검색
    • 친구 검색
    • 그룹 검색
    • 그룹 멤버 검색
  • 인터페이스 참고 문서
    • 고객 인터페이스
  • Guideline for Beginners
  • 콘솔 안내
    • 애플리케이션 생성 및 업그레이드
    • 기본 구성
    • 기능 구성
    • 계정 관리
    • 그룹 관리
    • 콜백 구성
  • 제품 소개
    • 메시지 관리
      • 1대1 메시지
      • 메시지 저장
      • 오프라인 푸시
      • 그룹 메시지
      • 메시지 포맷
    • 계정 시스템
      • 로그인 인증
      • 온라인 상태 관리
    • 그룹 관련
      • 그룹 시스템
      • 그룹 관리
    • 사용자 정보 및 관계망
      • 정보 관리
      • 관계망 관리
  • 구매 가이드
    • 과금 개요
    • 가격
  • 에러코드
이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

고객 인터페이스


Note:
Chat provides Flutter SDK API call examples. You can visit GitHub to obtain the source code.

Initialization and Login APIs

To use the Tencent Cloud Chat service, you need to initialize the SDK and log in.
API
Description
Initializes the SDK.
Uninitializes the SDK.
Logs in.
Logs out.
Gets the UserID of the current login user.
Gets the login status.
Gets the current server time (not supported on web).
Gets the version number.
Conversation feature entry.
Relationship chain feature entry.
Advanced group feature entry.
Advanced message feature entry.
Gets the version number.
Signaling entry.

Signaling APIs

API
Description
Adds a signaling listener.
Removes a signaling listener.
Invites a user.
Invites certain users in the group.
The inviter cancels the invitation.
The invitee accepts the invitation.
The invitee rejects the invitation.
Gets signaling information.
Creates a signaling request.

Message Creation APIs

After a message is created, an id field will be returned. You can pass in the id field and related information to the message sending API (sendMessage) to send the message.
API
Description
Creates a text message.
Creates a custom message.
Creates an image message.
Creates an audio message.
Creates a video message.
Creates an @ text message.
Creates a file message.
Creates a location message.
Creates an emoji message.
Creates a combined message.
Creates a forward message.
Creates a targeted group message.
Adds a multi-element message.

Message Sending and Receiving APIs

If you need to send or receive rich media messages (such as image, video, and file messages) and use advanced features such as recalling messages, marking messages as read, and querying message history, we recommend the following advanced message APIs. (The original APIs for simple message sending and receiving used by v3.6.0 and earlier versions have been disused. Please use new APIs to create and send messages.)
API
Description
Sets an event listener for advanced messages.
Removes the event listener for advanced messages.
Gets historical one-to-one (C2C) messages.
Gets historical messages (advanced API).
Gets historical group messages.
Marks one-to-one (C2C) messages as read.
Marks group messages as read.
Marks all messages as read.
Deletes a message from the local storage.
Deletes local and roaming messages.
Adds a message to the message list of a group chat.
Adds a message to the message list of a one-to-one chat.
Clears the chat history with a user from local storage and the cloud (without deleting the conversation).
Clears the chat history of a group from local storage and the cloud (without deleting the conversation).
Gets the sub messages of a combined message.
Resends a message.
Sets the one-to-one message receiving option for a user (batch setting supported).
Queries the one-to-one message receiving option of a user.
Modifies the group message receiving option.
Sets custom message data (saved locally, will not be sent to the peer end, and will become invalid after the app is uninstalled and reinstalled).
Sets custom message data and marks whether a voice or video message is played (such a message will be saved locally, not be sent to the peer end, and become invalid after the app is uninstalled and reinstalled).
Recalls a message. By default, you can recall only messages that are sent within two minutes. You can customize the time limit for message recall via the console (Feature Configuration > Login and Message > Message Recall Settings).
Modifies a message.
Sends a message.
Sends a reply message.
Searches for local messages.
Sends group message read receipts.
Gets read receipts for messages sent by yourself.
Gets the list of members who have (or have not) read a message sent by yourself.

Group APIs

Tencent Cloud Chat SDK supports five preset group types, each of which pertains to different scenarios.
Work group (Work): Users can join a work group only after being invited by members of the group. This group type is the same as private group (Private) in earlier versions.
Public group (Public): Users can join the group through requests, which need to be approved by the group owner or group admin.
Meeting group (Meeting): used together with TRTC to enable scenarios such as video conferencing and online education. Users can join and leave the group freely and view the message history before they join. Same as chat room (ChatRoom) in earlier versions.
Community (Community): A community allows users to join and leave freely and is ideal for ultra-large community group chat scenarios, such as knowledge sharing and game communication.
Audio-video group (AVChatRoom): An audio-video group allows users to join and leave freely and is suitable for scenarios such as live streaming and chat rooms with on-screen comments. There is no limit on the number of group members.
API
Description
Adds an event listener for groups.
Sets an event listener for groups.
Removes an event listener for groups.
Creates a group (advanced). The group information and the initial group members can be set during group creation.
Joins a group.
Leaves a group.
Deletes a group. Only the group owner and group admin can delete the group.
Gets the list of groups the current user has joined, excluding audio-video groups.
Gets the profiles of groups.
Modifies the profile of a group.
Initializes group attributes. This will clear the existing group attribute list.
Sets group attributes. If the group attributes already exist, their values are updated. Otherwise, the group attributes are added.
Deletes specified group attributes. Passing in null for keys means clearing all group attributes.
Gets specified group attributes. Passing in null for keys means getting all group attributes.
Searches for groups.
Gets the number of online users in a group. (This API is currently supported only by audio-video groups.)
Gets the group member list.
Gets the profiles of specified group members.
Modifies the profile of a specified group member.
Searches for group members.
Mutes a group member.
Removes members from a group.
Sets a role for a group member.
Transfers the ownership of a group.
Invites users to a group.
Gets the list of requests to join a group.
Accepts a request to join a group.
Rejects a request to join a group.
Marks the request list as read.
Gets the list of community groups the current user has joined.
Creates a topic.
Deletes a topic.
Sets topic attributes.
Gets the topics of a group.

Conversation List APIs

The conversation list is the list a user sees on the first screen after login. It includes elements such as conversation node, conversation name, group name, last message, and unread count.
API
Description
Adds a relationship chain listener.
Removes a relationship chain listener.
Sets a conversation listener.
Gets the conversation list.
Gets the list of specified conversations by conversation IDs.
Pins a conversation to the top.
Gets the total unread message count of a conversation.
Gets a specified conversation.
Deletes a conversation.
Sets a draft for a conversation.

User Profile APIs

You can use the following APIs to query user profiles, modify your profile, and block messages from a specified user (that is, adding a specified user to the blocklist).
API
Description
Gets user profiles.
Gets users' online statuses.
Modifies one's own user profile.
Sets the status of the current logged-in user.
Blocks messages from a user, which means adding the user to the blocklist.
Unblocks messages from a user, which means removing the user from the blocklist.
Gets the blocklist.

Offline Push APIs

We recommend you use the offline push service if you want your app to receive Chat service messages in real time when it runs in the background. As there is no unified push service in the Chinese mainland, you need to configure Android offline push for devices of different vendors separately.
API
Description
Sets the APNs offline push listener.
Configures offline push.
Configures offline push.
Configures offline push.

Friend Management APIs

By default, Tencent Cloud Chat does not check your relationship with a user when receiving and sending messages. You can enable Check Relationship for One-to-One Messages on Feature Configuration > Login and Message > Relationship Check in the Chat console and use the following APIs to delete/add friends and manage your friends.
API
Description
Sets a relationship chain listener to receive friend and blocklist change events.
Adds a relationship chain listener.
Removes a relationship chain listener.
Gets the contacts.
Gets the profiles of specified friends.
Sets the profile of a specified friend.
Adds a friend.
Deletes friends.
Checks your relationship with a specified user.
Gets the list of friend requests.
Accepts a friend request.
Rejects a friend request.
Deletes a friend request.
Marks a friend request as read.
Creates a friend list.
Gets the information of friend lists.
Deletes a friend list.
Modifies the name of a friend list.
Adds friends to a friend list.
Deletes friends from a friend list.
Searches for friends.