Skip to main content
POST
/
user
/
avatar
Obter Avatar
curl --request POST \
  --url https://api.example.com/user/avatar

Descricao

Retorna a URL da foto de perfil de um usuario do WhatsApp. Pode retornar thumbnail (preview) ou imagem completa.

Request

Headers

token: SEU_TOKEN
Content-Type: application/json

Body

{
  "Phone": "5511999999999",
  "Preview": true
}
CampoTipoObrigatorioDescricao
PhonestringSimNumero de telefone
PreviewbooleanNaoSe true, retorna thumbnail (default: true)

Response

Sucesso (200)

{
  "code": 200,
  "data": {
    "URL": "https://pps.whatsapp.net/v/t61.24694-24/...",
    "ID": "1645308319",
    "Type": "preview",
    "DirectPath": "/v/t61.24694-24/..."
  },
  "success": true
}

Campos da Resposta

CampoTipoDescricao
URLstringURL completa da imagem
IDstringID da foto de perfil
Typestringpreview ou image
DirectPathstringCaminho direto da imagem

Exemplos

Obter Thumbnail

curl -X POST 'https://api.bliper.ai/user/avatar' \
  -H 'token: SEU_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "Phone": "5511999999999",
    "Preview": true
  }'

Obter Imagem Completa

curl -X POST 'https://api.bliper.ai/user/avatar' \
  -H 'token: SEU_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "Phone": "5511999999999",
    "Preview": false
  }'

Diferencas entre Preview e Image

TipoResolucaoUso Recomendado
preview96x96Listas, thumbnails
imageOriginalVisualizacao completa
A URL retornada tem validade temporaria. Faca cache da imagem se necessario.
Se o usuario nao tiver foto de perfil ou tiver configurado privacidade, a resposta pode nao conter URL.