Chat
Media as base64
Retrieves the content of a locally stored media item in base64
GET
Media as base64
Auth:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: yes
Description
Reads media already stored locally (after ingestion) and returns the content in base64. Works for images, videos, audio, documents, and stickers.Only messages whose media has already been downloaded and persisted by the ingestion pipeline return data here. If the media does not yet exist in storage, the response is
404.Example
Success response
The response echoesmessage_id, brings mime_type and media_type (general category: image, video, audio, document, sticker), and returns in base64 the raw media bytes already encoded, ready to write to a file, upload elsewhere, or display inline. The payload can be large for long videos/audios.
200 OK
Path parameters
Instance name.
Query params
ID of the message that contains the media.
Headers
| Name | Required | Example | Description |
|---|---|---|---|
token | yes (or Authorization) | a1b2c3d4-... | TokenAccount or TokenInstance. |
Error responses
| HTTP | error.message | When it happens |
|---|---|---|
| 400 | Instance name is required | , |
| 400 | messageId query parameter is required | , |
| 401 | Invalid token | , |
| 404 | Instance not found | , |
| 404 | Message not found or no media available | Media missing or not yet downloaded. |
| 503 | Instance is not connected to WhatsApp | , |
Error 404
Related
Find message
Retrieve metadata before downloading.
Delivery status
Check delivery/read.