> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quickblox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Dialog by ID

> Retrieve a dialog by ID. <br/> *Added in v2.39.0*

#### Path Parameters

<ParamField path="chat_dialog_id" type="string" required>ID of the dialog to which a current message is connected. Generated automatically by the server after message creation.</ParamField>

#### Headers

<ParamField header="QB-Token" type="string" required> A user or application session token. See [Authentication](/reference/authentication) page to learn more about session tokens. Must be used either QB-Token or Authorization. </ParamField>
<ParamField header="Authorization" type="string" default="ApiKey {your_api_key}"> API key from Dashboard. Expected format: `ApiKey {your_api_key}`. Must be used either QB-Token or Authorization.</ParamField>
<ParamField header="On-Behalf-Of" type="string">User ID. The user ID of the user on whose behalf the request is being made.</ParamField>

#### Responses

<AccordionGroup>
  <Accordion title="200">
    A successful response

    <ResponseField name="_id" type="string" />

    <ResponseField name="created_at" type="string" />

    <ResponseField name="last_message" type="string" />

    <ResponseField name="last_message_date_sent" type="integer" />

    <ResponseField name="last_message_id" type="string" />

    <ResponseField name="last_message_user_id" type="integer" />

    <ResponseField name="name" type="string" />

    <ResponseField name="occupants_ids" type="array of integers" />

    <ResponseField name="admin_ids" type="array of integers (added in v2.52.0)" />

    <ResponseField name="photo" type="string" />

    <ResponseField name="type" type="integer" />

    <ResponseField name="updated_at" type="string" />

    <ResponseField name="user_id" type="integer" />

    <ResponseField name="xmpp_room_jid" type="string" />

    <ResponseField name="unread_messages_count" type="integer" />

    <ResponseField name="is_join_required" type="integer" />
  </Accordion>

  <Accordion title="403">
    An error response

    <ResponseField name="errors" type="array of strings" />
  </Accordion>

  <Accordion title="404">
    An error response

    <ResponseField name="errors" type="array of strings" />
  </Accordion>
</AccordionGroup>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET \
  -H "Content-Type: application/json" \
  -H "QB-Token: 1319b4991186601ccf4df2d0fa89565f68012bba" \
  https://api.quickblox.com/chat/Dialog/5d75393ba28f9a17e1cb0f9e.json
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "_id": "5d75393ba28f9a17e1cb0f9e",
    "created_at": "2019-09-08T17:24:11Z",
    "last_message": "sure, I can wait",
    "last_message_date_sent": 1567971414,
    "last_message_id": "5d755856a0eb47411e0b72a9",
    "last_message_user_id": 96753878,
    "name": "New Year 2020 party",
    "occupants_ids": [
      96753878,
      96754523,
      96830631,
      96831328,
      96831397
    ],
    "admin_ids": [],
    "photo": "68123",
    "type": 2,
    "updated_at": "2019-09-08T19:36:54Z",
    "user_id": 96753878,
    "xmpp_room_jid": "76730_5d75393ba28f9a17e1cb0f9e@muc.chat.quickblox.com",
    "unread_messages_count": 0,
    "is_join_required": 1
  }
  ```

  ```json 403 theme={null}
  {
    "errors": [
      "You don't have appropriate permissions to perform this operation"
    ]
  }
  ```

  ```json 404 theme={null}
  {
    "errors": [
      "The resource wasn't found"
    ]
  }
  ```
</ResponseExample>
