WhatsApi icon

WhatsApi

Connect with WhatApp HTTP API

Overview

The "Download Message Media" operation in the Messages resource allows users to download media content attached to a WhatsApp message. This node is useful when you want to retrieve and process media files such as images, videos, or documents sent or received via WhatsApp. For example, it can be used to automatically save incoming images from customers to cloud storage or to analyze video content shared in chats.

Properties

Name Meaning
Phone The session ID representing the phone number or WhatsApp session to use for the request.
Id The unique identifier of the message whose media is to be downloaded.
Ephemeral Out Of Sync Boolean flag indicating whether ephemeral messages are out of sync (true/false).
Key JSON object containing message key details such as remote chat ID, sender info, and message ID.
Labels JSON array of labels associated with the message.
Media Data JSON object describing local media path information.
Message JSON object containing detailed message metadata including media URL, mimetype, dimensions, etc.
Message Stub Parameters JSON array of stub parameters related to the message.
Message Timestamp String representing the timestamp of the message.
Poll Updates JSON array containing poll update data if applicable.
Reactions JSON array of reactions associated with the message.
User Receipt JSON array containing user receipt information for the message.

Output

The node outputs JSON data representing the downloaded media content and associated metadata. This typically includes the media file's binary data or a link to the downloaded file, along with relevant message details. If the media is binary, the output will contain the binary data field that can be used downstream for saving or further processing.

Dependencies

  • Requires an active WhatsApp HTTP API service endpoint configured via credentials.
  • Needs a valid session ID (phone) credential to authenticate requests.
  • The node depends on the external WhatsApp API to fetch media content.
  • Proper network access and permissions to reach the WhatsApp API server are necessary.

Troubleshooting

  • Common Issues:

    • Invalid or expired session ID may cause authentication failures.
    • Incorrect message ID or key details can result in failure to locate the media.
    • Network connectivity issues might prevent downloading media.
    • Permissions or quota limits on the WhatsApp API could block requests.
  • Error Messages:

    • Authentication errors usually indicate invalid or missing API credentials.
    • "Media not found" errors suggest incorrect message identifiers or that the media has been deleted.
    • Timeout or connection errors imply network problems or API unavailability.
  • Resolutions:

    • Verify and refresh the session ID credential.
    • Double-check all required message properties (id, key, message) are correctly provided.
    • Ensure stable internet connection and API endpoint accessibility.
    • Consult WhatsApp API documentation for rate limits and usage policies.

Links and References

Discussion