WAHA

Connect with Whatsapp HTTP API

Actions116

Overview

This node operation retrieves the profile picture of a specified contact from a contacts resource. It is useful in scenarios where you need to display or process the profile image of a contact, such as in messaging apps, CRM systems, or contact management workflows. For example, you can use it to fetch and display a user's profile picture in a chat interface or to update contact details with their latest image.

Use Case Examples

  1. Fetch the profile picture of a contact by providing their contact ID and session information.
  2. Refresh the profile picture from the server to get the latest image, bypassing the default 24-hour cache.

Properties

Name Meaning
Session The session identifier used to authenticate and specify the context for the request.
Contact Id The unique identifier of the contact whose profile picture is to be retrieved.
Refresh Boolean flag to refresh the picture from the server, bypassing the 24-hour cache. Use with caution to avoid rate limiting.
Request Options Additional request settings such as batching, SSL certificate validation, proxy configuration, and timeout settings.

Output

JSON

  • profilePictureUrl - URL of the retrieved profile picture of the contact.
  • contactId - The contact identifier for which the profile picture was fetched.
  • refreshed - Indicates if the profile picture was refreshed from the server (true) or served from cache (false).

Dependencies

  • Requires a valid session identifier for authentication.

Troubleshooting

  • Rate limit errors may occur if the refresh option is used too frequently; avoid unnecessary refreshes to prevent this.
  • Ensure the contact ID is valid and correctly formatted to avoid errors retrieving the profile picture.
  • If SSL certificate validation fails and the request is blocked, consider enabling the 'Ignore SSL Issues' option, but be aware of security risks.
  • Timeout errors may occur if the server is slow to respond; adjust the timeout setting as needed.

Discussion