App Logo
instagram.com

Send Instagram DM

Send a DM to an Instagram user by their username: plain text, an image attachment, or both together. Takes the image as base64 so it runs from any client. Returns ids/timestamps for whichever parts were sent, and the recipient-side restriction banner if one is shown right after sending.

Input

username required

Instagram handle without @, e.g. f1

message optional

Plain text message to send. At least one of message or fileBase64 is required.

filename optional

Filename to send the image as, e.g. photo.png. Required when fileBase64 is set.

mimeType optional

MIME type of the image; inferred from the filename extension when omitted.

fileBase64 optional

Image contents, base64-encoded (no data: prefix). At least one of message or fileBase64 is required.

Output

username required
notice optional

Recipient-side restriction banner visible in the thread right after sending, else null. May lag the server push — null does not guarantee delivery.

message optional
filename optional
messageId optional

id of the sent text message, null if no message was sent

timestampMs optional
mediaMessageId optional

id of the sent image message, null if no image was sent

mediaTimestampMs optional

Start building not clicking