GET
/
twitter
/
get_dm_history_by_user_id
cURL
curl --request GET \
  --url https://api.twitterapi.io/twitter/get_dm_history_by_user_id \
  --header 'X-API-Key: <api-key>'
{
  "messages": [
    {
      "id": "<string>",
      "recipient_id": "<string>",
      "sender_id": "<string>",
      "text": "<string>",
      "time": "<string>"
    }
  ],
  "status": "<string>",
  "message": "<string>"
}

Authorizations

X-API-Key
string
header
required

Query Parameters

login_cookies
string<string>
required

The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set

user_id
string<string>
required

The id of the user to get the direct message history with.Must be set

proxy
string<string>

The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://www.webshare.io/?referral_code=4e0q1n00a504

Response

200
application/json

Messages response

The response is of type object.