Detecção de Avatar do WhatsApp em Tempo Real
Verifique se o número global de entrada é uma conta do WhatsApp e obtenha o URL do avatar do WhatsApp.
Exemplo de código:
curl --location --request POST 'https://api.checknumber.ai/v1/realtime/whatsappavatar' \--header 'Content-Type: application/x-www-form-urlencoded' \--header 'X-API-Key: AbcdEfgh' \--data-urlencode 'number=628138800001&country=ID'
Resposta para o número de entrada que já registrou o WhatsApp
{ "status": "OK", "message": { "number": "+628138800001", "whatsapp": "yes", "avatar_url": "https://pps.whatsapp.net/v/xxxxx/xxxxx" }, "pricingStrategy": "PAY", "transactionId": "tphxc6te38gpcoyk8hkvwc"}
Resposta para o número de entrada que não registrou o WhatsApp
{ "status": "OK", "message": { "number": "+628138800001", "whatsapp": "no", "avatar_url": "" }, "pricingStrategy": "PAY", "transactionId": "tphxc6te38gpcoyk8hkvwc"}
Solicitação HTTP
POST https://api.checknumber.ai/v1/realtime/whatsappavatar
Parâmetros de solicitação
parâmetro | descrição |
---|---|
number | string , número de telefone |
country | string , Abreviação do país. Brasil: BR, México: MX, Nigéria: NG, Índia: IN. |
callback | opcional , string , url de retorno. É altamente recomendável usar o URL de retorno |
Formato de resposta
campos | descrição |
---|---|
status | código de status |
message | number : número de telefone whatsapp : conclusão |
Código de status
status | descrição |
---|---|
OK | charge , message contém o resultado |
FAIL | free , consulta inválida |
INVALID_INPUT | free , entrada inválida |
RETRY_LATER | free , erro do servidor, por favor, tente novamente mais tarde |