Passer au contenu principal
POST
/
whatsapp
/
contacts
/
info
Informations d'un contact
curl --request POST \
  --url https://api.wachap.com/v1/whatsapp/contacts/info \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "<string>",
  "phone": "<string>"
}
'

Endpoint

/v1/whatsapp/contacts/info

Headers

Authorization
string
requis
Bearer token avec votre Secret Key (format: Bearer sk_...)

Body Parameters

accountId
string
requis
L’identifiant du compte WhatsApp
phone
string
requis
Le numéro de téléphone (format: +22962861571 ou 22962861571)

Exemples de requêtes

curl -X POST https://api.wachap.com/v1/whatsapp/contacts/info \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "accountId": "account_xxx",
    "phone": "+22962861571"
  }'

Exemple de réponse

{
  "success": true,
  "message": "Informations récupérées",
  "contactInfo": {
    "jid": "[email protected]",
    "phoneNumber": "22962861571",
    "name": "John Doe",
    "businessName": "John's Business",
    "verifiedName": "Official Name",
    "status": "Hey there!",
    "pictureId": "1234567890",
    "devices": ["0"],
    "isBusinessAccount": true
  }
}

Champs de la réponse

ChampTypeDescription
jidstringIdentifiant WhatsApp du contact
phoneNumberstringNuméro de téléphone sans indicateur
namestringNom enregistré dans le store local
businessNamestringNom business du contact (si disponible)
verifiedNamestringNom vérifié WhatsApp (comptes business uniquement)
statusstringStatut WhatsApp du contact
pictureIdstringID de la photo de profil
devicesarrayListe des appareils connectés
isBusinessAccountbooleanIndique si c’est un compte business

Codes d’erreur

CodeDescription
400MISSING_ACCOUNT_ID - accountId manquant
400MISSING_PHONE - phone manquant
401INVALID_SECRET_KEY - Clé secrète invalide
404ACCOUNT_NOT_FOUND - Compte WhatsApp non trouvé
404CONTACT_NOT_FOUND - Contact non trouvé

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json
accountId
string
phone
string

Réponse

200

OK