Upload a media file to use in WhatsApp sends. The response returns a media_id that you then pass to the Send Media endpoint. Send the file as multipart/form-data.
File types. Images (image/jpeg, image/png, image/webp), video (video/mp4, video/3gpp), audio (audio/aac, audio/mp4, audio/mpeg, audio/amr, audio/ogg, audio/opus) and documents (PDF, plain text, Word, Excel, PowerPoint). WhatsApp's own size limits apply.
Timing. The file is passed on to WhatsApp after this call returns. Send it within 20 minutes; a media_id used before processing finishes, or after it expires, fails with 0x17.
Response. Always HTTP 200: the upload's own status is in status_code, and its result or error in remote_response.
Authentication: stream token in the Authorization header (see Authentication in the API Overview).
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||