---
title: "GET /users/{userID}/messages"
method: GET
path: "/users/{userID}/messages"
tags: ["message"]
---

# GET /users/{userID}/messages

`GET /users/{userID}/messages`

DMチャンネルに存在するメッセージを取得します。

## Query parameters

- `limit` integer
- `offset` integer
- `since` string, date-time
- `until` string, date-time
- `inclusive` boolean
- `order` 'asc' | 'desc'

## Response `200`

正常に取得ができました。
メッセージの配列を返します。

- Message[]
  - `messageId` string, uuid — メッセージUUID
  - `userId` string, uuid — 投稿者UUID
  - `parentChannelId` string — 投稿先チャンネルUUID
  - `content` string — メッセージ本体
  - `createdAt` string, date-time — メッセージ投稿日時
  - `updatedAt` string, date-time — メッセージ更新日時
  - `pin` boolean — ピン留めされているかどうか
  - `reported` boolean — 自分が通報しているかどうか
  - `stampList` MessageStamp[] — メッセージスタンプ配列
    - `userId` string, uuid — ユーザーUUID
    - `stampId` string, uuid — スタンプUUID
    - `count` integer — 押された個数
    - `createdAt` string, date-time — 最初に押した日時
    - `updatedAt` string, date-time — 最後に押した日時

## Other responses

- `400` — 変更に失敗しました 不正なリクエストです
- `404` — 取得に失敗しました。 指定したユーザーは存在しません。

## Changes

- **2019-08-26** `4de5b90479f5` — 1 breaking
  - for the `query` request parameter `until`, default value `9999-12-31T23:59:99.999999Z` was removed
- **2019-07-24** `66a69a1387ed` — 1 info
  - api operation id `getDirectMessages` was added
- **2019-07-05** `6956f2622a20` — 12 info
  - the endpoint scheme security `traqOAuth2` was added to the API
  - endpoint reactivated
  - added the new optional `query` request parameter `inclusive`
  - added the new optional `query` request parameter `limit`
  - …8 more

[Change history](https://skmtc.dev/traptitech/apis/traq-api/changes/users/:userID/messages/get.md)

---

[API](https://skmtc.dev/traptitech/apis/traq-api.md) · [All operations](https://skmtc.dev/traptitech/apis/traq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/traptitech/traq-api/revisions/84d2b25db3ba/schema)
