WhatsApp Media Decrypt icon

WhatsApp Media Decrypt

Decrypt WhatsApp encrypted media files (.enc)

WhatsApp Media Decrypt

AI-generated

Overview

This node decrypts encrypted WhatsApp media files (.enc) using a provided media key. It supports various WhatsApp media types such as audio, video, image, document, and sticker messages. The node downloads the encrypted media from a specified URL, decrypts it using one of several selectable decryption methods (or tries all automatically), and outputs the decrypted media either as binary data or a base64 string. This node is useful for workflows that need to process or analyze WhatsApp media content securely and automatically.

Use Case Examples

  1. Decrypt an audio message from a WhatsApp encrypted media URL to obtain the playable audio file.
  2. Automatically try multiple decryption algorithms to handle different WhatsApp media encryption schemes.
  3. Convert decrypted media to base64 string for embedding in JSON-based workflows or APIs.

Properties

Name Meaning
Media URL The URL of the encrypted WhatsApp media file (.enc) to download and decrypt.
Media Key The base64 encoded media key used to decrypt the WhatsApp media file.
Media Type The type of WhatsApp media message (audio, video, image, document, or sticker) to help determine decryption and file extension.
Output Format How to return the decrypted media, either as binary data or a base64 encoded string.
File Extension File extension for the decrypted file (e.g., .ogg, .mp4, .jpg). If left empty, the node auto-detects based on media type.
Decryption Method The decryption method to use. 'Auto' tries all methods automatically until one succeeds.

Output

Binary

Decrypted WhatsApp media file data when output format is set to binary.

JSON

  • success - Indicates if the decryption was successful (true or false).
  • originalUrl - The original URL of the encrypted media file.
  • mediaType - The type of WhatsApp media message decrypted.
  • fileName - The generated file name for the decrypted media file.
  • fileSize - The size in bytes of the decrypted media file.
  • decryptedAt - Timestamp when the media was decrypted.
  • base64Data - Base64 encoded string of the decrypted media (present if output format is base64).
  • error - Error message if decryption failed (present if success is false).
  • itemIndex - Index of the item in the input data array that caused an error (present if success is false).

Dependencies

  • Requires internet access to download the encrypted media file from the provided URL.
  • Uses external libraries for HTTP requests and multiple decryption algorithms.

Troubleshooting

  • Ensure the Media URL and Media Key are correctly provided and valid; missing or incorrect values cause errors.
  • If the download fails, check the URL accessibility and network connectivity.
  • If all decryption methods fail in 'auto' mode, try specifying a particular decryption method manually.
  • Timeouts may occur if the media file is large or the server is slow; consider increasing timeout or checking server response.
    Errors include 'URL and Media Key are required fields!' and 'Failed to download file: HTTP '.
  • Decryption errors provide messages indicating which method failed, aiding in troubleshooting.

Discussion