Altera a imagem do perfil do WhatsApp
curl --request POST \
--url https://api.wppfy.com/profile/image \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"image": "https://picsum.photos/640/640.jpg"
}
'import requests
url = "https://api.wppfy.com/profile/image"
payload = { "image": "https://picsum.photos/640/640.jpg" }
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({image: 'https://picsum.photos/640/640.jpg'})
};
fetch('https://api.wppfy.com/profile/image', 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://api.wppfy.com/profile/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image' => 'https://picsum.photos/640/640.jpg'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/profile/image"
payload := strings.NewReader("{\n \"image\": \"https://picsum.photos/640/640.jpg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/profile/image")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image\": \"https://picsum.photos/640/640.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/profile/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image\": \"https://picsum.photos/640/640.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Imagem do perfil alterada com sucesso",
"profile": {
"image_updated": true,
"image_removed": false,
"updated_at": 1704067200
}
}{
"error": "Formato de imagem inválido ou URL inacessível"
}{
"error": "No session"
}{
"error": "Limite de alterações excedido ou conta com restrições"
}{
"error": "Imagem muito grande, tamanho máximo permitido excedido"
}{
"error": "Erro ao alterar imagem do perfil"
}Perfil
Altera a imagem do perfil do WhatsApp
Altera a imagem de perfil da instância do WhatsApp.
O endpoint realiza:
- Atualiza a imagem do perfil usando
- Processa a imagem (URL, base64 ou comando de remoção)
- Sincroniza a mudança com o servidor do WhatsApp
- Retorna confirmação da alteração
Importante:
- A instância deve estar conectada ao WhatsApp
- A imagem será visível para todos os contatos
- A imagem deve estar em formato JPEG e tamanho 640x640 pixels
POST
/
profile
/
image
Altera a imagem do perfil do WhatsApp
curl --request POST \
--url https://api.wppfy.com/profile/image \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"image": "https://picsum.photos/640/640.jpg"
}
'import requests
url = "https://api.wppfy.com/profile/image"
payload = { "image": "https://picsum.photos/640/640.jpg" }
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({image: 'https://picsum.photos/640/640.jpg'})
};
fetch('https://api.wppfy.com/profile/image', 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://api.wppfy.com/profile/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'image' => 'https://picsum.photos/640/640.jpg'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.wppfy.com/profile/image"
payload := strings.NewReader("{\n \"image\": \"https://picsum.photos/640/640.jpg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.wppfy.com/profile/image")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"image\": \"https://picsum.photos/640/640.jpg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/profile/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"image\": \"https://picsum.photos/640/640.jpg\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Imagem do perfil alterada com sucesso",
"profile": {
"image_updated": true,
"image_removed": false,
"updated_at": 1704067200
}
}{
"error": "Formato de imagem inválido ou URL inacessível"
}{
"error": "No session"
}{
"error": "Limite de alterações excedido ou conta com restrições"
}{
"error": "Imagem muito grande, tamanho máximo permitido excedido"
}{
"error": "Erro ao alterar imagem do perfil"
}Autorizações
Corpo
application/json
URL da imagem
Exemplo:
"https://picsum.photos/640/640.jpg"
⌘I
