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

# Get Contact Profile Picture URL

> Get the profile picture URL of a contact

## Description

This endpoint returns the profile picture URL of a specific contact on WhatsApp. The returned URL can be used to download or display the profile image.

## Query Parameters

<ParamField query="sessionId" type="string" required>
  Authenticated session ID
</ParamField>

<ParamField query="jid" type="string" required>
  Contact identifier (WhatsApp JID). Format: `5511999999999@s.whatsapp.net`
</ParamField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "url": "https://pps.whatsapp.net/v/t61.24694-24/...",
    "id": "1234567890",
    "type": "image"
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Picture URL returned successfully
* `400` - Invalid parameters
* `401` - Unauthorized session
* `404` - Session, contact not found or contact has no profile picture

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.wappfy.com.br/api/contacts/profile-picture?sessionId=my-session&jid=5511999999999@s.whatsapp.net"
  ```

  ```javascript JavaScript theme={null}
  const sessionId = 'my-session';
  const jid = '5511999999999@s.whatsapp.net';
  const response = await fetch(
    `https://api.wappfy.com.br/api/contacts/profile-picture?sessionId=${sessionId}&jid=${jid}`
  );
  const data = await response.json();
  console.log(`Picture URL: ${data.url}`);

  // Download the image
  const imageResponse = await fetch(data.url);
  const imageBlob = await imageResponse.blob();
  console.log('Image downloaded successfully!');
  ```

  ```python Python theme={null}
  import requests

  session_id = 'my-session'
  jid = '5511999999999@s.whatsapp.net'
  response = requests.get(
      'https://api.wappfy.com.br/api/contacts/profile-picture',
      params={
          'sessionId': session_id,
          'jid': jid
      }
  )
  data = response.json()
  print(f"Picture URL: {data['url']}")

  # Download the image
  image_response = requests.get(data['url'])
  with open('profile.jpg', 'wb') as f:
      f.write(image_response.content)
  print('Image saved as profile.jpg')
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json get /api/contacts/profile-picture
openapi: 3.1.0
info:
  title: Wappfy - WhatsApp HTTP API
  version: '2.0'
  contact: {}
servers:
  - url: https://{host}
    description: Customizable Server
    variables:
      host:
        default: api.wappfy.com.br
        description: Server URL (e.g., api.wappfy.com.br or your-server.com)
security:
  - api_key: []
tags:
  - name: 🖥️ Sessions
    description: Control WhatsApp sessions (accounts)
  - name: 🔑 Auth
    description: Authentication
  - name: 🆔 Profile
    description: Your profile information
  - name: 🖼️ Screenshot
    description: Get WhatsApp screenshot and display QR code
  - name: 📤 Chatting
    description: Conversation methods
  - name: 📢 Channels
    description: Channels (newsletters) methods
  - name: 🟢 Status
    description: Status (aka stories) methods
  - name: 💬 Chats
    description: Conversations methods
  - name: 👤 Contacts
    description: |-
      Contacts methods.<br>
                      Use phone number (without +) or phone number and `@c.us` at the end as `contactId`.<br>
                      E.g: `12312312310` OR `12312312310@c.us`<br>
  - name: 👥 Groups
    description: Groups methods.<br>
  - name: ✅ Presence
    description: Presence information
  - name: 📅 Events
    description: Event Message
  - name: 🏷️ Labels
    description: Labels - available only for WhatsApp Business accounts
  - name: 🔍 Observability
    description: Other methods
  - name: 🗄️ Storage
    description: Storage methods
externalDocs:
  description: Wappfy - WhatsApp API
  url: https://docs.wappfy.com.br/
paths:
  /api/contacts/profile-picture:
    get:
      tags:
        - 👤 Contacts
      summary: Get contact's profile picture URL
      description: >-
        If privacy settings don't allow getting the image, the method will
        return null
      operationId: ContactsController_getProfilePicture
      parameters:
        - name: contactId
          required: true
          in: query
          example: 5511999999999@c.us
          schema:
            type: string
        - name: refresh
          required: false
          in: query
          example: false
          description: >-
            Refresh the picture from the server (24h cache by default). Do not
            refresh if not needed, you can get rate limit error
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: ''
      security:
        - api_key: []
components:
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````