{
"picture": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}
{
"success": true
}
Profile
Update Picture
Update the user profile picture in the WhatsApp session
PUT
/
api
/
{session}
/
profile
/
picture
{
"picture": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}
{
"success": true
}
Description
This endpoint allows you to update the profile picture of the user authenticated in the WhatsApp session. The image must be sent in base64 format.URL Parameters
Request Body
Profile picture image encoded in base64. The image will be set as the new user profile picture on WhatsApp.
{
"picture": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}
Response
{
"success": true
}
Status Codes
200- Picture updated successfully400- Invalid parameters or missing base64 image401- Unauthorized413- Image too large500- Internal server error
Usage Example
curl -X PUT https://api.wappfy.com.br/api/my-session/profile/picture \
-H "Content-Type: application/json" \
-d '{"picture": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="}'
const session = 'my-session';
const base64Image = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==';
const response = await fetch(`https://api.wappfy.com.br/api/${session}/profile/picture`, {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
picture: base64Image
})
});
const data = await response.json();
console.log(data);
import requests
import base64
session = 'my-session'
# Read image and convert to base64
with open('profile.jpg', 'rb') as image_file:
base64_image = base64.b64encode(image_file.read()).decode('utf-8')
response = requests.put(
f'https://api.wappfy.com.br/api/{session}/profile/picture',
json={'picture': base64_image}
)
data = response.json()
print(data)
Observations
- The image must be in base64 format
- Supported formats: JPG, PNG, GIF
- It is recommended to use square images for better display
- Recommended maximum size: 5MB
