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: +2290112345678 ou 2290112345678)

Exemples de requêtes

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

Exemple de réponse

{
  "success": true,
  "message": "Informations récupérées",
  "contactInfo": {
    "jid": "[email protected]",
    "phoneNumber": "2290112345678",
    "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