v1

latestOpenAPI 3.0.1MIT2026-07-26589101.4 KB

Send a direct message to a user.You must set the login_cookie..You can get the login_cookie 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.Trial operation price: $0.003 per call.

post/twitter/send_dm_to_user

Request body

login_cookiesstring required

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

user_idstring required

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

textstring required

The text of the direct message.Must be set

media_idstring

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

proxystring required

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

reply_to_message_idstring

The id of the message to reply to.Optional

Response

Login response

message_idstring

The id of the sent direct message.

statusstring

Status of the request.success or error

msgstring

Message of the request.error message