Skip to main content

Get Chatroom

A chatroom is a place where users can interact with each other. LikeMinds React Chat SDK supports different types of chatrooms, including:

  • Open chatrooms: Open to all users within the community, allowing for broad participation and discussions.
  • Secret chatrooms: Highly secure and hidden, accessible only to invited members, ensuring utmost privacy and confidentiality.

These diverse chatroom types cater to various communication needs, providing flexibility and control over the conversations within your React chat application. A chatroom can be created by a user or by the community manager.

Fetch a single chatroom

  1. To fetch the chatroom, use the getChatroom() method of the client you initialised.
  2. Pass in. the required parameter chatroomId.
  3. Process the response as per your requirement.
const payload: any = {
chatroomId: 89899, // pass in your chatroomId.
};
const response = await lmChatClient.getChatroom(payload);

if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Get Chatroom Payload

List of parameters supported.

VariableTypeDescriptionOptional
chatroomIdintChatroom Id

Get Chatroom Response

List of parameters in the response.

VariableTypeDescriptionOptional
successbooleanAPI success status
chatroomObjectChatroom data object✔️
error_messageStringError log incase the API fails✔️