Overview
This document provides instructions for creating a private chatroom and linking it to a cohort of users on the LikeMinds platform. The document includes cURL examples for each API call, making it easier to understand and implement the required steps. It is important to note that only CM (Community Manager) users can perform these actions.
Steps
Create a Private Chatroom → From Dashboard and get the chatroom id. Only CM user can hit the following APIs.
Create a Cohort → Call /community/cohort (POST) with name and uuids → Preferred CM curl :
curl --location 'https://auth.likeminds.community/community/cohort' \\
--header 'x-api-key: <LM API KEY>' \\
--header 'Content-Type: application/json' \\
--header 'Authorization:<auth_token>' \\
--data '{
"name": "Normal cohort 2",
"uuids": [<user_ids>]
}'
- Link the Cohort to Chatroom (POST)
curl --location 'https://auth.likeminds.community/chatroom/cohort' \\
--header 'x-api-key: <api_key>' \\
--header 'Content-Type: application/json' \\
--header 'Authorization:<auth_token>' \\
--data '{
"chatroom_id": <CHATROOM_ID>,
"cohort_ids": <COHORT_ID>
}'
- Check whether cohort has been added to chatroom or not. (GET) → cohort_access=2
curl --location 'https://auth.likeminds.community/chatroom/cohort/access?chatroom_id=29557' \\
--header 'x-api-key: <api_key>' \\
--header 'Authorization:<auth_token>'
- Generate Private Chatroom Link -as per the template
https://<YOUR\_DOMAIN>/collabcard/{chatroom\_id}?cohort\_id=<cohort_id>