Skip to main content

Get Member's Chat Rooms

Retrieve a list of chat rooms to which a specific user belongs.


GET
    https://api.deadsimplechat.com/consumer/api/v2/user/:uniqueUserIdentifier/rooms

Request

GET /consumer/api/v2/user/:uniqueUserIdentifier/rooms

info

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

Query Parameters

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

Path Parameters

ParameterDescriptionData Type
uniqueUserIdentifierUnique Identifier for the userString

Responses

Success Response

A JSON array containing the chat rooms the user is a member of. Each object in the array will have the following fields:

FieldDescriptionData Type
roomIdThe unique identifier for the chat roomString
nameThe name of the chat roomString

HTTP Status: 200 OK

Body Example:

[
{
"roomId": "12345",
"name": "General Chat"
},
{
"roomId": "67890",
"name": "Technical Support"
}
]

Error Responses

  • User not found:

    HTTP Status: 400 Bad Request

    Body:

    {
    "message": "user not found"
    }
  • Invalid API Key:

    HTTP Status: 401 Unauthorized

    Body:

    {
    "error": "Invalid API Key"
    }
  • No API Key Specified:

    HTTP Status: 400 Bad Request

    Body:

    {
    "error": "Please specify API Key"
    }

Code Examples

JavaScript (Fetch API)

fetch("https://api.deadsimplechat.com/consumer/api/v2/user/<USER_IDENTIFIER>/rooms?auth=<YOUR_SECRET_KEY>")