Skip to main content

Get Chat Room Conversation Messages

Get Chat Room Conversation Messages allows you to fetch the messages for the conversations. You need to specify the conversation id.

https://api.deadsimplechat.com/consumer/api/v2/room/:roomId/conversation/:conversationId/messages?auth=<private_key>
info

The auth query parameter is your private key. You can find it in your Dashboard under Developer -> Private Key.

Send HTTP GET Request to fetch the messages of a specific conversation in the chat room.

Query Parameters

ParameterDescriptionData Type
authGo to Dashboard -> Developer -> Private Key is your authString

Path Parameters

ParameterDescriptionData Type
roomIdThe unique identifier for the chat roomString
conversationIdThe unique identifier for the conversationString

Response

Following user properties are sent if available:

  • _id
  • conversation
  • messages
  • created
  • user

Success: 200

[
{
"_id": "65a54d88ca5c521b1a7595d9",
"conversation": "65a54d85ca5c521b1a7595c7",
"messages": "Hello",
"created": "2024-01-15T15:21:44.293Z",
"user": {
"_id": "648e211a81cea20bd8b1581d",
"username": "admin",
"email": "mohammed.lakkadshaw@gmail.com"
}
},
{
"_id": "65a54d8aca5c521b1a7595e1",
"conversation": "65a54d85ca5c521b1a7595c7",
"messages": "I am the hero",
"created": "2024-01-15T15:21:46.497Z",
"user": {
"_id": "648e211a81cea20bd8b1581d",
"username": "admin",
"email": "mohammed.lakkadshaw@gmail.com"
}
},
{
"_id": "65a54d8fca5c521b1a7595f7",
"conversation": "65a54d85ca5c521b1a7595c7",
"messages": "okay",
"created": "2024-01-15T15:21:51.594Z",
"user": {
"_id": "65a54d70ca5c521b1a759564",
"username": "hero",
"uniqueUserIdentifier": "guest_647474e3-f315-42d6-9396-57dec233194b"
}
},
{
"_id": "65a54d97ca5c521b1a7595ff",
"conversation": "65a54d85ca5c521b1a7595c7",
"messages": "but my name is hero",
"created": "2024-01-15T15:21:59.464Z",
"user": {
"_id": "65a54d70ca5c521b1a759564",
"username": "hero",
"uniqueUserIdentifier": "guest_647474e3-f315-42d6-9396-57dec233194b"
}
}
]

Bad Request: 400

{
"success": false,
"message": "error message"
}

Example Request

  • This example demonstrates a curl request to get chatroom conversation messages.
  • The roomId is set to 'G1M_aMHjR'.
  • The conversationId is set to '65a54d85ca5c521b1a7595c7'.
  • The private key (used for auth) is set to '32326a74704a39394d676d2d3872315f78545f38435f656f6c554a325842776341754f4b4f41336c743335774b344361'.
curl -X GET "https://api.deadsimplechat.com/consumer/api/v2/chatroom/G1M_aMHjR/conversation/65a54d85ca5c521b1a7595c7/messages?auth=32326a74704a39394d676d2d3872315f78545f38435f656f6c554a325842776341754f4b4f41336c743335774b344361"