Get contact's profile picture URL
curl --request GET \
--url https://{host}/api/contacts/profile-picture \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/contacts/profile-picture"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{host}/api/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://{host}/api/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 => [
"apikey: <api-key>"
],
]);
$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://{host}/api/contacts/profile-picture"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/contacts/profile-picture")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/contacts/profile-picture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"url": "https://pps.whatsapp.net/v/t61.24694-24/...",
"id": "1234567890",
"type": "image"
}
Contacts
Get Contact Profile Picture URL
Get the profile picture URL of a contact
GET
/
api
/
contacts
/
profile-picture
Get contact's profile picture URL
curl --request GET \
--url https://{host}/api/contacts/profile-picture \
--header 'apikey: <api-key>'import requests
url = "https://{host}/api/contacts/profile-picture"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://{host}/api/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://{host}/api/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 => [
"apikey: <api-key>"
],
]);
$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://{host}/api/contacts/profile-picture"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/contacts/profile-picture")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/contacts/profile-picture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"url": "https://pps.whatsapp.net/v/t61.24694-24/...",
"id": "1234567890",
"type": "image"
}
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
string
required
Authenticated session ID
string
required
Contact identifier (WhatsApp JID). Format:
5511999999999@s.whatsapp.net{
"url": "https://pps.whatsapp.net/v/t61.24694-24/...",
"id": "1234567890",
"type": "image"
}
Status Codes
200- Picture URL returned successfully400- Invalid parameters401- Unauthorized session404- Session, contact not found or contact has no profile picture
Usage Example
curl -X GET "https://api.wappfy.com.br/api/contacts/profile-picture?sessionId=my-session&jid=5511999999999@s.whatsapp.net"
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!');
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')
