Actions37
- Message Actions
- Media Actions
- Contact Actions
- Group Actions
- Instance Actions
- Webhook Actions
Overview
The "Get Media URL" operation of the Media resource in this node allows users to retrieve a direct download URL for a specific media file stored on the WhatsApp API server. This is useful when you need to access or share media content (such as images, videos, documents, audio, or stickers) that has been previously uploaded or received via WhatsApp.
Common scenarios include:
- Downloading media files sent or received in WhatsApp conversations for backup or processing.
- Accessing media URLs to embed or link media content in other applications or workflows.
- Automating retrieval of media content for further analysis or storage.
For example, after receiving a media message, you can use this operation to get the downloadable URL and then use it to fetch the media file externally.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional extra parameters: • Reply to Message ID (string): ID of message to reply to • Delay (seconds) (number): Delay before sending message • Disable Link Preview (boolean): Disable link previews in messages • Mention Users (string): Phone numbers to mention (comma-separated) |
Note: For the "Get Media URL" operation specifically, the key input property is:
| Name | Meaning |
|---|---|
| mediaId | The unique identifier of the media file whose download URL you want to retrieve. |
This property is required but not listed explicitly in your provided JSON; it is referenced in the code as this.getNodeParameter("mediaId", e).
Output
The output of this operation is a JSON object containing the response from the WhatsApp API proxy endpoint. It typically includes the direct download URL for the requested media file.
The structure of the output JSON depends on the API response but generally contains fields such as:
url: The direct URL to download the media.- Other metadata related to the media file.
Since this node communicates with an external API through a proxy, the exact JSON structure mirrors the API's response.
No binary data is output directly by this operation; instead, it provides a URL which can be used to download the media externally.
Dependencies
- Requires an active connection to the Uazapi WhatsApp API service.
- Requires credentials including:
- An API key credential for the proxy service.
- API token and instance ID for authenticating with the WhatsApp API.
- The node uses an HTTP POST request to a proxy endpoint (
https://n8ntools.io/api/v1/proxy/uazapi) which forwards the request to the actual WhatsApp API. - Proper configuration of these credentials in n8n is necessary for successful operation.
Troubleshooting
- Invalid or missing mediaId: If the
mediaIdparameter is incorrect or missing, the API will fail to return a valid URL. Ensure the media ID is correct and corresponds to an existing media file. - Authentication errors: Errors related to authorization usually indicate invalid or expired API tokens or keys. Verify that all credentials are correctly set up and have not expired.
- Network or proxy issues: Since the node relies on a proxy service, network connectivity problems or proxy downtime can cause failures. Check internet connectivity and proxy service status.
- API rate limits: Excessive requests may lead to rate limiting by the WhatsApp API or proxy. Implement retry logic or reduce request frequency if needed.
- Error messages returned from the API are passed through in the output JSON under an error field if "Continue On Fail" is enabled. Review these messages for specific causes.
Links and References
- WhatsApp Business API Documentation
- Uazapi Official Website (for service-specific details)
- n8n Documentation for general node usage and credential setup
- Proxy service documentation at https://n8ntools.io (if available)