> ## 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 Message by ID

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

#### Path Parameters

<ParamField path="chat_message_id" type="string" required> ID of the message. 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="message" type="string" />

    <ResponseField name="attachments" type="array">
      <Expandable title="properties">
        <ResponseField name="type" type="string" />

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

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

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

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

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

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

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

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

    <ResponseField name="read_ids" type="array" />

    <ResponseField name="delivered_ids" type="array" />

    <ResponseField name="read" 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/Message/66f2a030bba14b4c2e000000.json
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "hello",
    "attachments": [],
    "_id": "66f2a030bba14b4c2e000000",
    "created_at": "2024-09-24T11:19:12Z",
    "updated_at": "2024-09-24T11:19:12Z",
    "chat_dialog_id": "66ed332108a4fb0d2dc2d147",
    "date_sent": 1727176752,
    "sender_id": 20618,
    "recipient_id": 0,
    "read_ids": [
      20618
    ],
    "delivered_ids": [
      20618
    ],
    "read": 0
  }
  ```

  ```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>
