POST
/
twitter
/
send-dm
Send DM
curl --request POST \
  --url https://api.twitterxapi.com/twitter/send-dm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "myusername",
  "msg": "Hello, how are you?",
  "reply_to": "1234567890123456789",
  "cookie": "auth_token=abc123..."
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "attachment": {
      "type": "image",
      "url": "https://example.com/image.jpg"
    },
    "id": "1234567890123456789",
    "text": "Hello, how are you?",
    "time": "2024-01-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Parameters for sending DM

Response

200
application/json

A message objects.

Response for sending DM