---
title: "GET /twitter/get_dm_history_by_user_id"
method: GET
path: "/twitter/get_dm_history_by_user_id"
---

# GET /twitter/get_dm_history_by_user_id

`GET /twitter/get_dm_history_by_user_id`

## Request

- Base URL: `https://api.twitterapi.io`
- URL: `https://api.twitterapi.io/twitter/get_dm_history_by_user_id`
- Auth: API key in header `X-API-Key`

Get the direct message history with a user.

## Query parameters

- `login_cookies` string, string, required
- `user_id` string, string, required
- `proxy` string, string

## Response `200`

Messages response

- object
  - `messages` object[]: Array of messages
    - `id` string: ID of the message
    - `recipient_id` string: ID of the recipient user
    - `sender_id` string: ID of the sender user
    - `text` string: Content of the message
    - `time` string: Timestamp of the message in milliseconds (Unix epoch)
  - `status` string: Status of the request.success or error
  - `message` string: Message of the request.error message

## Other responses

- `400`: Unexpected error

## Changes

- **2026-11-03** `03599c7e3236`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/changes/twitter/get_dm_history_by_user_id/get.md)

---

[API](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api.md) - [All operations](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/twitterapi/apis/twitterapi-io-the-most-stable-fastest-cheapest-twitter-api/revisions/03599c7e3236?raw)
