OpenWA icon

OpenWA

Interact with OpenWA WhatsApp API Gateway

Actions164

Contact → Get LID

AI-generated

Summary

Retrieve the LID (privacy ID) for a WhatsApp contact given their phone number and a specific session.

Inputs

  • Session Name or ID (required) — Select or specify the ID of the session to use for retrieving the contact's LID.
  • Phone Number (required) — Enter the phone number in international format or a phone-based WhatsApp contact ID. The input will be sanitized by removing spaces, plus signs, hyphens, parentheses, and any '@c.us' or '@s.whatsapp.net' suffix. Privacy IDs, groups, and channels cannot be used.

Output shape

a single record containing the contact's LID returned as JSON

The operation requires OpenWA version 0.27.1 or later and an API key with OPERATOR privileges; chat-restricted keys are not allowed. The output JSON includes the LID corresponding to the given phone number for the specified session.

Examples

Example 1: Retrieve the LID for a contact in a given session

Set 'Session Name or ID' to a valid session ID and provide the contact's phone number in international format without extra characters or suffixes to get the LID of that contact.

Links

Discussion