Skip to main content
Version: 3.0.0

🔑 Send a Document by Id

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

await whatsapp.sendDocumentById(
phoneNumber : 'PHONE_NUMBER',
mediaId : 'media_id',
caption : 'WhatsApp Flutter Docs File',
fileName: 'whatsapp-flutter.pdf'
);
paramtyperequireddescription
phoneNumberStringyesPhone number with county code and plus.
mediaIdStringyesUpload document's media id
captionStringnoA caption with document
fileNameStringnoDocument file name