Skip to main content
POST
cURL
Send a direct message to a user.You must set the login_cookies.You can get the login_cookies from /twitter/user_login_v2.You can only send DMs to those who have enabled DMs. Sometimes it may fail, so be prepared to retry.Price: 200 credits ($0.002 per call).

Authorizations

X-API-Key
string
header
required

Body

application/json
login_cookies
string
required

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

user_id
string
required

The id of the user to send the direct message to.Must be set

text
string
required

The text of the direct message.Must be set

proxy
string
required

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

media_id
string

ID of a single media asset to attach. Optional. Obtain from /twitter/upload_media_v2.

reply_to_message_id
string

The id of the message to reply to.Optional

Response

Login response

message_id
string

The id of the sent direct message.

status
string

Status of the request.success or error

message
string

Message of the request.error message