# Get full image
curl -X GET "https://api.livchat.ai/v1/contacts/avatar?phone=5511999999999" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get thumbnail
curl -X GET "https://api.livchat.ai/v1/contacts/avatar?phone=5511999999999&preview=true" \
-H "Authorization: Bearer YOUR_API_KEY"
const phone = "5511999999999";
const response = await fetch(
`https://api.livchat.ai/v1/contacts/avatar?phone=${phone}&preview=true`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
const { url } = await response.json();
{
"url": "https://pps.whatsapp.net/v/t61.24694-24/...",
"id": "1645308319",
"type": "preview",
"directPath": "/v/t61.24694-24/..."
}
{
"error": {
"code": 404,
"message": "Profile picture not found"
}
}
Contacts
Get Avatar
Get a contact’s profile picture
GET
/
v1
/
contacts
/
avatar
# Get full image
curl -X GET "https://api.livchat.ai/v1/contacts/avatar?phone=5511999999999" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get thumbnail
curl -X GET "https://api.livchat.ai/v1/contacts/avatar?phone=5511999999999&preview=true" \
-H "Authorization: Bearer YOUR_API_KEY"
const phone = "5511999999999";
const response = await fetch(
`https://api.livchat.ai/v1/contacts/avatar?phone=${phone}&preview=true`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
const { url } = await response.json();
{
"url": "https://pps.whatsapp.net/v/t61.24694-24/...",
"id": "1645308319",
"type": "preview",
"directPath": "/v/t61.24694-24/..."
}
{
"error": {
"code": 404,
"message": "Profile picture not found"
}
}
Get the profile picture URL for a WhatsApp contact.
Query Parameters
string
required
Phone number to get avatar for
boolean
If
true, returns thumbnail (96x96). If false, returns full image. Default: falseResponse Fields
string
Direct URL to the profile picture
string
Picture ID (changes when picture is updated)
string
preview or image# Get full image
curl -X GET "https://api.livchat.ai/v1/contacts/avatar?phone=5511999999999" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get thumbnail
curl -X GET "https://api.livchat.ai/v1/contacts/avatar?phone=5511999999999&preview=true" \
-H "Authorization: Bearer YOUR_API_KEY"
const phone = "5511999999999";
const response = await fetch(
`https://api.livchat.ai/v1/contacts/avatar?phone=${phone}&preview=true`,
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
}
);
const { url } = await response.json();
{
"url": "https://pps.whatsapp.net/v/t61.24694-24/...",
"id": "1645308319",
"type": "preview",
"directPath": "/v/t61.24694-24/..."
}
{
"error": {
"code": 404,
"message": "Profile picture not found"
}
}
Profile picture URLs are temporary and may expire. Cache the image data, not the URL.