> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hypersender.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Profile Picture

> Retrieve the profile picture URL for a specific contact.

Get the profile picture URL for any contact in your WhatsApp instance.

This endpoint allows you to:

* Retrieve profile picture URLs for contacts
* Display contact avatars in your application
* Verify contact identity visually

<Info>
  The returned URL is a direct link to the WhatsApp CDN where the profile picture is hosted.
</Info>

## Use Cases

### Display Contact Avatars

Show contact profile pictures in your application's UI for better user experience.

### Contact Identity Verification

Visually verify contact identity before sending sensitive information.

### CRM Integration

Sync contact profile pictures to your CRM system for better contact management.

### Chat Interface

Build a chat interface that displays profile pictures alongside messages.

## Request Parameters

### chat\_id

The contact identifier can be in one of these formats:

* **Phone number**: `123123123`
* **Chat ID (regular)**: `123123@c.us`
* **Chat ID (lid)**: `123123@lid`

## Response Examples

### Successful Response

When the profile picture is found:

```json theme={null}
{
  "message": "Profile picture retrieved successfully.",
  "data": {
    "profilePictureURL": "https://pps.whatsapp.net/v/t61.24694-24/374498176_337577482181161_7091117586184162691_n.jpg?ccb=11-4&oh=01_Q5Aa3gEERUGD4fegyplSv2MnHmt_UIA9JnpjREhSJMNVWZC-RA&oe=6970FAAA&_nc_sid=5e03e0&_nc_cat=104"
  }
}
```

### No Profile Picture

When the contact has no profile picture:

```json theme={null}
{
  "message": "Profile picture not available.",
  "data": {
    "profilePictureURL": null
  }
}
```

## Best Practices

<Tip>
  Cache the profile picture URLs to reduce API calls. Profile pictures don't change frequently.
</Tip>

<Warning>
  The profile picture URLs are temporary and may expire. Always fetch a fresh URL if you encounter a broken image.
</Warning>

<Note>
  Some users may have privacy settings that prevent you from viewing their profile picture. In such cases, the URL will be null or point to a default image.
</Note>

## Integration Example

### Displaying Profile Pictures in Your App

```javascript theme={null}
// Fetch profile picture
const response = await fetch(
  `https://app.hypersender.com/api/whatsapp/v2/${instance}/contacts/profile-picture?chat_id=${chatId}`,
  {
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json'
    }
  }
);

const data = await response.json();

// Use the URL in your UI
if (data.data.profilePictureURL) {
  document.getElementById('avatar').src = data.data.profilePictureURL;
} else {
  // Use a default avatar
  document.getElementById('avatar').src = '/default-avatar.png';
}
```


## OpenAPI

````yaml v2/api-reference/whatsapp/whatsapp-collection.json GET /{instance}/contacts/profile-picture
openapi: 3.1.0
info:
  version: v2.0
  title: Hypersender WhatsApp API Docs
  description: >

    The Hypersender WhatsApp API is a powerful api to send and recieve messages
    using your own whatsapp number.

    Without the high costs of Meta's Whatsapp business API.


    In this Docs you'll learn how to use and integrate Hypersnder Whatsapp API
    into your existing system/service or application using simple API endpoints.


    ## What's New in V2?


    **Queued Responses:** All requests in V2 are now queued for improved
    reliability and performance. When you make a request, you'll receive an
    immediate response with a `queued_request_uuid` that you can use to check
    the status of your request.


    **Example Response:**

    ```json

    {
        "queued": true,
        "message": "Processing your request...",
        "queued_request_uuid": "a0816120-7e37-4e8b-8cf3-92deb2cdc133",
        "queued_request_link": "https://app.hypersender.com/api/whatsapp/v2/{instance}/queued-requests/{queued_request_uuid}"
    }

    ```


    Use the `queued_request_link` or the **Get Queued Request** endpoint to
    check the actual message response once it's processed.


    **What you can Do?**


    - Send Text and basic Url messages.

    - Send Media through Link or uploaded file.

    - Send Audio through Link or uploaded file.

    - Send Contact Card

    - Send Location

    - Send Poll votes


    **You can also**


    - React to a message

    - Forward messages to other chats

    - Acknowledge messages (mark as read)

    - Star and unstar messages



    <hr />


    **Quick Demo**

      **Learn how to use Hypersender whatsapp API to send a message using Postman:**
      [Demo Link](https://app.hypersender.com/send-whatsapp-message-in-postman) **to easily interact with our API.**

    <hr />


    **postman collection**


    You can download our [Postman
    Collection](https://docs.hypersender.com/whatsapp-postman-collection.json)
    to easily interact with our API.


    ## Servers (Endpoints)


    - Production (activated):
    [https://app.hypersender.com/api/whatsapp/v2](https://app.hypersender.com/api/whatsapp/v2)
servers:
  - url: https://app.hypersender.com/api/whatsapp/v2
    description: Production
security:
  - Authorization: []
paths:
  /{instance}/contacts/profile-picture:
    get:
      tags:
        - Contacts
      summary: Get profile picture
      description: Retrieve the profile picture URL for a specific contact.
      parameters:
        - name: Accept
          in: header
          description: application/json
          schema:
            type: string
            example: application/json
        - name: Content-Type
          in: header
          description: application/json
          schema:
            type: string
            example: application/json
        - name: instance
          in: path
          description: Instance UUID copied from hypersender dashboard
          required: true
          schema:
            type: string
            example: '{{ instance_id }}'
        - name: chat_id
          in: query
          description: Phone number (123123123) or chat ID (123123@c.us or 123123@lid)
          required: true
          schema:
            type: string
            example: 100875997589545@lid
      responses:
        '200':
          description: Profile picture retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Profile picture retrieved successfully.
                  data:
                    type: object
                    properties:
                      profilePictureURL:
                        type: string
                        description: URL of the profile picture
                        example: >-
                          https://pps.whatsapp.net/v/t61.24694-24/374498176_337577482181161_7091117586184162691_n.jpg?ccb=11-4&oh=01_Q5Aa3gEERUGD4fegyplSv2MnHmt_UIA9JnpjREhSJMNVWZC-RA&oe=6970FAAA&_nc_sid=5e03e0&_nc_cat=104
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
      security:
        - Authorization: []
components:
  schemas:
    NotFoundError:
      type: object
      title: NotFoundError
      example:
        message: Resource not found.
      properties:
        message:
          type: string
      x-examples:
        Example 1:
          message: Resource not found.
      x-stoplight:
        id: ar3vz55asbxme
    ValidationError:
      type: object
      title: ValidationError
      properties:
        message:
          type: string
        errors:
          type: object
          description: Invalid or missing feilds will be shown here
        statusCode:
          type: number
      example:
        message: The given data was invalid.
        errors: {}
        statusCode: 422
      required:
        - errors
        - statusCode
      x-examples:
        Multiple fields Error:
          message: The given data was invalid.
          errors:
            messages:
              - The number you want to send the message to is not on whatsapp.
            jid: 20121323124131@s.whatsapp.net
            exists: false
          statusCode: 422
        'Single Field error ':
          message: The given data was invalid.
          errors:
            messages:
              - textMessage.text should not be empty
          statusCode: 422
      x-stoplight:
        id: 90x3wfxw7gqcb
    ServerError:
      type: object
      title: ServerError
      properties:
        message:
          type: string
      example:
        message: Internal Server Error
      x-stoplight:
        id: 2fhq2gihsfreh
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````