tencent cloud

Chat

제품 소개
제품 개요
Basic Concepts
응용 시나리오
기능 소개
계정 시스템
사용자 정보 및 관계망
메시지 관리
그룹 시스템
Official Account
Audio/Video Call
사용 제한
구매 가이드
과금 개요
요금 안내
Purchase Instructions
Renewal Guide
연체 안내
Refund Policy
다운로드 센터
SDK & Demo 소스 코드
업데이트 로그
시나리오 솔루션
Live Streaming Setup Guide
AI Chatbot
대규모 엔터테인먼트 협업 커뮤니티
Discord 구현 가이드
IM을 게임에 통합하는 방법
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
클라이언트 APIs
SDK API(Web)
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
서버 APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
콘솔 가이드
New Console Introduction
애플리케이션 생성 및 업그레이드
기본 설정
기능 설정
계정 관리
그룹 관리
Official Channel Management
콜백 설정
모니터링 대시보드
Viewing Guide for Resource Packages
Real-Time Monitor
개발 보조 툴
액세스 관리
Advanced Features
FAQ
uni-app FAQs
구매
SDK 관련 질문
계정 인증
사용자 정보 및 관계망
메시지
그룹
라이브 방송 그룹
닉네임 및 프로필 사진
협약 및 인증
Service Level Agreement
컴플라이언스 인증
IM 정책
개인 정보 보호 정책
데이터 개인 정보 보호 및 보안 계약
에러 코드
문의하기

React Native

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-01-13 12:01:25

TencentCloudChat

TencentCloudChat is the namespace of the Chat JavaScript SDK and provides the static method create() for creating SDK instances, the event constant EVENT, and the type constant TYPES, and the signaling constant TSignaling.

Initialization

API
Description
create
Creates an SDK instance.

SDK Instance

Term
Description
Message
Message indicates the content to be sent and carries multiple attributes which specify whether you are the sender, the sender account, the message generation time, and so on.
Two types of conversation are available:
Client to Client (C2C): A one-to-one chat, involving only two participants.
GROUP: A group chat, involving more than two participants.
Profile
Profile describes the basic information of a user, including the nickname, gender, personal signature, and profile photo URL.
Friend
Friend describes the basic information of a friend, including the remarks and friend list.
FriendApplication
FriendApplication describes the basic information of a friend request, including the friend source and remarks.
FriendGroup
FriendGroup describes the basic information of a friend group, including the friend group name and members.
Group
Group indicates a communication system for group chatting, including Work Group, Public Group, Meeting Group, Audio-Video Group, and Community Group.
GroupMember
GroupMember indicates the basic information of each group member, such as the ID, nickname, role, and the time of joining the group.
Group tip
A group tip is generated when an event such as adding or deleting group member occurs. The access side can configure whether to display group tips to group members.
Group system message
For example, when a user requests to join a group, the group admin receives a system message. After the admin accepts or rejects the request, the Chat SDK returns the result to the access side, which then displays the result to the user.
Message display on screen
The sent messages, including text segments and images, are displayed on the computer or phone screen.

Event

API
Description
on
Enables event listening.
off
Disables event listening.

Plugin registration

API
Description
Registers a plugin.

Setting log level

API
Description
Sets the log level. Logs below this level will not be printed.

SDK instance termination

API
Description
destroy
Terminates an SDK instance. The SDK will log out, disconnect the WebSocket persistent connection, and then release resources.

Login

API
Description
login
Logs in to the Chat SDK using userID and userSig.
logout
Logs out to the Chat SDK.
isReady
Indicates the SDK enter the ready state or not.
Get the userID of the logged-in user. If the user is not logged in, it returns an empty string ('').
Get the server time.

Message

API
Description
Creates a text message.
Creates a text message with the @ notification feature.
Creates an image message.
Creates an audio message.
Creates a video message.
Creates a custom message.
Creates an emoji message.
Creates a file message.
Creates a location message.
Creates a combined message.
Downloads a combined message.
Creates a forward message.
Sends a message.
Recalls a message.
Deletes a message.
Translates a message.
Sets message extensions.
Gets message extensions.
Deletes message extensions.
Add message reactions. This interface allows for scenarios such as "emoji reactions" to be implemented.
Remove message reactions.
Retrieve information of message reactions.
Paginate and retrieve the user list for a specific message reaction.

Conversation

API
Description
Modifies a message.
Gets the message list.
Pulls the conversation message list by specified sequence or time range.
Sends message read receipts.
Pulls the list of message read receipts.
Pulls the list of members who have (or have not) read a group message.
Queries local messages in a specified conversation by messageID.
Marks a message as read.
Gets the conversation list.
Gets the conversation information.
Deletes a conversation.
Set conversation draft.
Clears the chat history with a user from local storage and the cloud (without deleting the conversation).
Pins/Unpins a conversation to/from top.
Marks the unread messages of all conversations as read.
Sets the conversation message notification type. You can use this API to mute notifications or reject messages.
Gets the total unread message count of conversations.

Conversation group

API
Description
Sets custom conversation data.
Marks a conversation.
Gets the list of conversation groups.
Creates a conversation group.
Deletes a conversation group.
Renames a conversation group.
Adds a conversation to a conversation group.
Deletes conversations from a conversation group.

Search

API
Description
Search cloud messages.
Search cloud users.
Search cloud groups.
Search cloud group members.

Profile

API
Description
Gets personal profile.
Gets other user’s profile.
Updates your personal profile.
Gets your blocklist.
Adds a user to the blocklist.
Removes a user from the blocklist.

User status

API
Description
Sets one's own custom status.
Queries a user's status.
Subscribes to a user's status.
Unsubscribes from a user's status.

Relationship Chain

API
Description
Gets the contacts in the SDK cache.
addFriend
Adds friends.
Deletes friends.
Verifies friend relationship.
Gets the friend data and profile data of a specified user.
Updates the contacts data of friends.
Gets the friend request list in the SDK cache.
Accepts a friend request.
Rejects a friend request.
Deletes a friend request.
Set a friend request as reads.
Gets list of friend groups in the SDK cache.
Creates a friend group.
Deletes a friend group.
Adds friends to a friend group.
Removes friends from a friend group.
Modifies the name of a friend group.

Group

API
Description
Gets the group list.
Gets the group profile.
Creates a group.
Disbands a group.
Modifies the group profile.
joinGroup
Requests to join a group.
quitGroup
Quits a group.
Searches for a group.
Gets the number of online users in an audio-video group.
Transfers the group ownership.
Gets the list of requests to join a group.
Processes requests to join the group.
Initializes group attributes.
Sets group attributes.
Deletes group attributes.
Gets group attributes.
Sets group counters.
Increases the specified group counters.
Decreases the specified group counters.
Gets the specified group counters.

Group member

API
Description
Gets the group member list.
Gets a group member’s profile.
Adds a group member.
Deletes a group member.
Configures the muting period.
Modifies the group member’s role.
Sets the name card for a group member.
Sets a custom field for a group member.
Marks group members.

Topic

API
Description
Gets the list of community groups the current user has joined.
Creates a topic in a community group.
Deletes a topic in a community group.
Updates a topic profile in a community group.
Gets the topic list in a community group.

Signaling

API
Description
Listens for a signaling event.
Removes listener for a signaling event.
invite
Invites someone.
Invites members in a group.
cancel
The inviter cancels the invitation.
accept
The invitee accepts the invitation.
reject
The invitee rejects the invitation.
Gets signaling info from a message.
Modifies a invitation.


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백