实时WhatsApp头像检测
检查输入的全局号码是否是WhatsApp帐户,并获取WhatsApp头像URL。
代码示例:
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'
已注册WhatsApp的输入号码的响应
{ "status": "OK", "message": { "number": "+628138800001", "whatsapp": "yes", "avatar_url": "https://pps.whatsapp.net/v/xxxxx/xxxxx" }, "pricingStrategy": "PAY", "transactionId": "tphxc6te38gpcoyk8hkvwc"}
未注册WhatsApp的输入号码的响应
{ "status": "OK", "message": { "number": "+628138800001", "whatsapp": "no", "avatar_url": "" }, "pricingStrategy": "PAY", "transactionId": "tphxc6te38gpcoyk8hkvwc"}
HTTP请求
POST https://api.checknumber.ai/v1/realtime/whatsappavatar
请求参数
参数 | 描述 |
---|---|
number | string ,电话号码 |
country | string ,国家缩写。巴西:BR,墨西哥:MX,尼日利亚:NG,印度:IN。 |
callback | optional ,string ,回调URL。强烈建议使用回调URL |
响应格式
字段 | 描述 |
---|---|
status | 状态码 |
message | number :电话号码 whatsapp :结论 |
状态码
状态 | 描述 |
---|---|
OK | charge ,message 包含结果 |
FAIL | free ,无效查询 |
INVALID_INPUT | free ,无效输入 |
RETRY_LATER | free ,服务器错误,请稍后重试 |