media resource handles the lifecycle of every file you send or receive. Uploaded media gets a mediaId you reference from messages.send; inbound media arrives as a mediaId you resolve to a signed URL.
Upload
file accepts a Buffer or Uint8Array — stream the file yourself if it doesn’t fit in memory.
UploadOptions
UploadOptions
mediaId only long enough to use it — WhatsApp expires uploaded media after ~30 days.
Get URL
Resolve an inboundmediaId to a signed, time-limited URL plus metadata:
MediaUrlResult
MediaUrlResult
Authorization header when you fetch it.
Delete
Supported MIME types
WhatsApp restricts which types are accepted per content category. The SDK passes whatever you give it — validation happens server-side.
Check the official limits table for current size caps — they change per account tier.