Send Media
Send Document/File
Sends a file to given chat, with caption or not, using base64. This is exactly the same as send image
Parameters
message
Message that you will send
receiverNumber
Receiver number (e.g, [code country][number] 6283838204803)
file
File name (use relative path if the file is in outsite laravel folder, e.g /home/ardhana/Downloads/wavel.zip
)
isGroup
fill true
if the receiverNumber
is group (e,g [code country][number]-[random number] 6283838204803-0000@g.us
)
Example
Send Image
Sends a image to given chat, with caption or not, using base64
Parameters
Description
message
Message that you will send
receiverNumber
Receiver number (e.g, [code country][number] 6283838204803)
file
Image's file name (use relative path if the file is in outsite laravel folder, e.g /home/ardhana/Downloads/cute_dog.png
)
isGroup
fill true
if the receiverNumber
is group (e,g [code country][number]-[random number] 6283838204803-0000@g.us
)
Example
Send Image as Sticker
This function takes an image (including animated GIF) and sends it as a sticker to the recipient. This is helpful for sending semi-ephemeral things like QR codes. The advantage is that it will not show up in the recipients gallery. This function automatically converts images to the required webp format.
Parameters
Description
receiverNumber
Receiver number (e.g, [code country][number] 6283838204803)
file
Image's file name (use relative path if the file is in outsite laravel folder, e.g /home/ardhana/Downloads/cute_cat.jpg
)
isGroup
fill true
if the receiverNumber
is group (e,g [code country][number]-[random number] 6283838204803-0000@g.us
)
Example
Send .webp File as Sticker
You can use this to send a raw webp file as sticker.
Parameters
Description
receiverNumber
Receiver number (e.g, [code country][number] 6283838204803)
file
.webp's
file name (use relative path if the file is in outsite laravel folder, e.g /home/ardhana/Download/sticker.webp
)
isGroup
fill true
if the receiverNumber
is group (e,g [code country][number]-[random number] 6283838204803-0000@g.us
)
Example
Send a File by URL
Sends a file by Url
Parameters
Description
receiverNumber
Receiver number (e.g, [code country][number] 6283838204803)
url
URL's file
message
Message that you will send
isGroup
fill true
if the receiverNumber
is group (e,g [code country][number]-[random number] 6283838204803-0000@g.us
)
Example
Decrypt Media
Decrypts a media message.
Parameters
Description
messageId
The id of a message. The format is [boolean]_[ChatId]_[random character string]
Example:
"false_447123456789@c.us_9C4D0965EA5C09D591334AB6BDB07FEB"
Example
Last updated
Was this helpful?