Skip to main content
Version: 4.0.0

🔑 Send Document by ID

Send a document to the specified phone number using uploaded media.

await whatsapp.sendDocumentById(
phoneNumber : 'RECIPIENT_NUMBER',
documentId : 'media_id',
caption : 'Sample File',
fileName: 'sample.pdf'
);
paramtyperequireddescription
phoneNumberStringyesPhone number with country code.
documentIdStringyesUploaded document's media ID
captionStringnoA caption with document
fileNameStringnoDocument file name