DinastiAPI User icon

DinastiAPI User

Get user information and manage presence with DinastiAPI WhatsApp API

Overview

This node interacts with the DinastiAPI WhatsApp API to retrieve user-related information and manage presence. Specifically, the Get Avatar operation fetches the profile picture (avatar) of a specified WhatsApp user, group, newsletter, or local ID (LID). It supports retrieving either a thumbnail preview or the full image and optionally saving the avatar as binary data within the workflow.

Common scenarios where this node is useful include:

  • Displaying user avatars in customer support dashboards.
  • Archiving or processing profile pictures for contacts or groups.
  • Automating workflows that require user identity verification via profile images.

Example: You want to get the avatar of a WhatsApp group by its group ID and save the full-size image as binary data for further processing or storage.

Properties

Name Meaning
Target Phone number, Group ID (@g.us), Newsletter ID (@newsletter), or LID (@lid) to get the avatar for.
Preview Whether to get a thumbnail preview (true) or the full picture (false).
Save as Binary Whether to save the avatar image as binary data within the workflow output (true or false).
Binary Property Name The name of the binary property where the avatar image will be stored if "Save as Binary" is enabled.

Output

The node outputs JSON data containing the avatar information returned by the API. This typically includes a URL or a base64-encoded image string under the data field.

If "Save as Binary" is enabled and the avatar data is a base64-encoded image, the node converts it into binary format and stores it in the specified binary property name. This binary data includes:

  • data: The base64-encoded image content.
  • mimeType: The MIME type of the image (e.g., image/jpeg).
  • fileExtension: The file extension derived from the MIME type (e.g., jpg).
  • fileName: A generated filename based on the target and file extension.

If the avatar data is a URL starting with http, the node adds a note suggesting to use an HTTP Request node to download the image.

Dependencies

  • Requires an active connection to the DinastiAPI WhatsApp API service.
  • Needs an API key credential configured in n8n for authenticating requests to the DinastiAPI.
  • The node uses internal helper functions to validate phone numbers and make authenticated API requests.

Troubleshooting

  • Invalid Target Format: Ensure the "Target" input is correctly formatted as a phone number, group ID, newsletter ID, or LID. Invalid formats may cause API errors.
  • Avatar Not Found: If the user or group has no profile picture, the API might return empty or null data.
  • Binary Data Issues: When saving as binary, ensure the binary property name is valid and unique to avoid overwriting other binary data.
  • HTTP URL Handling: If the avatar URL starts with http, the node does not download the image automatically; you must add an HTTP Request node to fetch the image.
  • API Authentication Errors: Verify that the API key credential is correctly set up and has sufficient permissions.

Links and References

Discussion