Overview
Look up information about WhatsApp contacts. Contact methods live under client.WhatsApp.Contacts. The examples assume ctx is a context.Context, such as context.Background().
Check if a Number Has WhatsApp
Use this as a WhatsApp number checker: find out whether a phone number has a WhatsApp account before you message it, and get its chat ID. (learn more)
List the contacts saved on the instance, with pagination and sorting. (learn more)
All fields are optional. Pass nil to use the defaults.
Get a single contact by phone number or chat ID. (learn more)
Get WhatsApp Profile Picture
Get the URL of a contact’s WhatsApp profile picture. (learn more)
Save a contact on the instance, or update its name if it already exists. (learn more)
LIDs
WhatsApp sometimes identifies contacts by a LID (linked identifier, e.g. 1111111@lid) instead of their phone number. Use these methods to map between the two. (learn more about LIDs)
Get Phone Number by LID
Resolve a LID to the contact’s phone-number chat ID. (learn more)
Get LID by Phone Number
Find the LID linked to a phone number. (learn more)
Get All Known LIDs
List the LID to phone number mappings the instance knows about. (learn more)
All fields are optional. Pass nil to use the defaults.
Get LIDs Count
Get how many LID mappings the instance knows about. (learn more)
Last modified on November 24, 2026