Get profile picture
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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"
}
}{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {},
"statusCode": 422
}{
"message": "Internal Server Error"
}Get Profile Picture
Retrieve the profile picture URL for a specific contact.
GET
/
{instance}
/
contacts
/
profile-picture
Get profile picture
curl --request GET \
--url https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v2/{instance}/contacts/profile-picture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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"
}
}{
"message": "Resource not found."
}{
"message": "The given data was invalid.",
"errors": {},
"statusCode": 422
}{
"message": "Internal Server Error"
}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
The returned URL is a direct link to the WhatsApp CDN where the profile picture is hosted.
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):
[email protected] - Chat ID (lid):
123123@lid
Response Examples
Successful Response
When the profile picture is found:{
"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:{
"message": "Profile picture not available.",
"data": {
"profilePictureURL": null
}
}
Best Practices
Cache the profile picture URLs to reduce API calls. Profile pictures don’t change frequently.
The profile picture URLs are temporary and may expire. Always fetch a fresh URL if you encounter a broken image.
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.
Integration Example
Displaying Profile Pictures in Your App
// 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';
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
application/json
Example:
"application/json"
application/json
Example:
"application/json"
Path Parameters
Instance UUID copied from hypersender dashboard
Example:
"{{ instance_id }}"
Query Parameters
Phone number (123123123) or chat ID ([email protected] or 123123@lid)
Example:
"100875997589545@lid"