Aysali API icon

Aysali API

Interact with Aysali API

Chat → Get Media As Base64

AI-generated

Summary

Fetches media from a given message and returns it as a Base64-encoded string, with optional video-to-MP4 conversion.

Inputs

  • instanceName (required) — The name of the Aysali instance to use.
  • messageId (required) — ID of the message that contains the media.
  • convertToMp4 (required) — Whether to convert video media to MP4 format.

Output shape

object

Contains a Base64-encoded string of the requested media (optionally converted to MP4).

Examples

Example 1: Retrieve an image from a WhatsApp message

Set instanceName to your Evolution API instance, provide the messageId, leave convertToMp4 false.

Example 2: Download a video and force MP4 encoding

Provide instanceName and messageId, set convertToMp4 to true.

Links

Discussion