Media Messages
You can only send a text message up until 24 hours after receiving a message from the user. If you have not received a message from the user within this time, you will need to start a new conversation by sending a Template Message.
Use the messages
node to send messages containing audio, documents, images, stickers, or videos to your customers.
In essence, when you send a message that includes media, you must provide the link to the media in the request body. You must also specify the type of media that you are sending: audio
, document
, image
, sticker
, or video
. When the request is received, the media is uploaded to the WhatsApp server and sent to the user indicated in the to_contact
field.
Links - To use a link, you supply an HTTP(S) link from which the application will download the media, saving you the step of uploading media yourself. Please make sure you are using a mp4 direct link.
You can provide a link
parameter pointing to the media you want to send. Currently only HTTP/HTTPS links are supported. You will need to use a link that directs to the mp4 file itself, which might not be available if using basic video platforms. Some suggested platforms that offer this type of link are Google Cloud Storage Bucket, AWS S3 Bucket, Streamable.
Send a media message
POST
https://api.qikchat.in/v1/messages
To send a media message, use the request URL and the following body parameters.
Headers
QIKCHAT-API-KEY*
string
place API key
Request Body
to_contact*
string
customer whatsapp number you want to send message
type*
string
audio | document | image | video | sticker
SPECIFIC OBJECT*
object
A successful response includes a data object
with an ID for the message sent.
The relevant object (dictionary with “id”) is nested in array which itself is in other dict.
Example
The sample below shows multiple different objects such as audio
, document
, image
, sticker
, and video
for illustration purposes only. A valid request body contains only one of them.
Post-Processing Media Size
audio
16 MB
document
100 MB
image
5 MB
sticker
100 KB
video
16 MB
Supported Content-Types
audio
audio/aac, audio/mp4, audio/amr, audio/mpeg, audio/ogg; codecs=opus
Note: The base audio/ogg type is not supported.
document
Any valid MIME-type.
image
image/jpeg, image/png
Images with transparent backgrounds won't support.
sticker
image/webp
video
video/mp4, video/3gpp
Notes:
Only H.264 video codec and AAC audio codec is supported. Only videos with a single audio stream are supported.
Last updated