• UIKit
  • SDK
  • サーバー API
Chat/
SDK/
Flutter/
インターフェースリファレンスドキュメンテーション/
SDK
  • Chat SDK のインストール
    • インストール
  • Chat SDK の初期化
    • 初期化
  • ログインとログアウト
    • ログインとログアウト
  • メッセージ
    • メッセージの概要
    • メッセージ送信
    • メッセージの受信
    • 過去のメッセージ
    • メッセージ転送
    • メッセージの変更
    • メッセージ挿入
    • メッセージ削除
    • メッセージをクリア
    • メッセージの取り消し
    • オンラインメッセージ
    • 既読レシート
    • クエリーメッセージ
    • グループ @ メッセージ
    • ターゲットグループメッセージ
    • 通知のサイレントモード
    • メッセージ拡張
  • セッション
    • セッションの概要
    • セッションリスト
    • セッションの取得
    • 未読セッション数
    • セッションの先頭固定表示
    • セッションの削除
    • セッションの下書き
    • セッショングループ
  • グループ
    • グループの概要
    • グループ管理
    • グループプロファイル
    • グループメンバーの管理
    • グループメンバープロファイル
    • グループプロパティのカスタマイズ
  • ユーザー
    • ユーザープロファイル
    • 友達管理
    • 友達リスト
    • ブラックリスト
  • オフラインプッシュ
    • オフラインプッシュ
  • シグナリング
    • シグナリング管理
  • ローカル検索
    • メッセージ検索
    • 友達を検索
    • グループの検索
    • グループメンバーの検索
  • インターフェースリファレンスドキュメンテーション
    • 顧客インターフェース
  • Guideline for Beginners
  • コンソールガイド
    • アプリケーションの作成とアップグレード
    • 基本設定
    • 機能設定
    • アカウント管理
    • グループ管理
    • コールバック設定
  • 製品紹介
    • メッセージ管理
      • シングルチャットメッセージ
      • メッセージの保存
      • オフラインプッシュ
      • グループメッセージ
      • メッセージフォーマット
    • アカウントシステム
      • ログイン認証
      • オンライン状態管理
    • グループ関連
      • グループシステム
      • グループ管理
    • ユーザープロファイルとリレーションシップチェーン
      • 資料管理
      • リレーションシップチェーン管理
  • 購入ガイド
    • 課金の概要
    • 価格
  • エラーコード
このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。

顧客インターフェース


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.