Media Upload
string
required
API key generated for the TUC associated with the sending phone number.
string
application/jsonimage.id, document.id).
Request parameters
string
required
WhatsApp phone number (with country code) for which media is being uploaded.
file
required
Media file to upload (image, document, video, etc.), sent as multipart form data.
As an alternative to
file, send a url form field holding a remote file URL. Send one
or the other, not both.Sample cURL request
Sample JSON payload
Sample response payload
string
Media ID assigned to the uploaded file.
string
"success" on successful upload.integer
HTTP status code of the upload operation.
string
Hosted URL of the uploaded media file.
Response
Error codes
Fetch Media URL
string
required
API key generated for the TUC associated with the sending phone number.
Query parameters
string
required
Media ID returned from the Media Upload endpoint.
string
required
WhatsApp sender phone number associated with the media.
Sample cURL request
Download Media
string
required
API key generated for the TUC associated with the sending phone number.
Query parameters
string
required
Hosted media URL (e.g. the
onextel_media_url value returned from Media Upload, or the
URL returned from Fetch Media URL).string
required
WhatsApp sender phone number associated with the media.

