> For the complete documentation index, see [llms.txt](https://support.whapi.cloud/help-desk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.whapi.cloud/help-desk/receiving/http-api/retrieve-phone-number-from-whatsapp-lid.md).

# Retrieve Phone Number from WhatsApp LID

WhatsApp is gradually replacing phone-number-based identification with privacy-focused identifiers such as LID and BSUID.

This improves user privacy, but it can also affect CRM, ERP, chatbot, and support workflows that still depend on phone numbers.

For more context, see:

* [WhatsApp LID (`@lid`): what it means and how to use it](https://support.whapi.cloud/help-desk/faq/whatsapp-lid-lid)
* [WhatsApp usernames and BSUID](https://support.whapi.cloud/help-desk/faq/whatsapp-usernames-and-bsuid)

Whapi.Cloud already supports LID identifiers for sending and receiving messages. When your workflow still requires a phone number, use the [**Get ID by LID**](https://whapi.readme.io/reference/getidbylid) method.

### When this method is useful

Use it when you need to:

* Find a customer in a CRM or ERP by phone number;
* Match a new LID-based conversation with an existing contact;
* Avoid duplicate customer records;
* Support legacy workflows that still use phone numbers;
* Display the customer’s number to an operator.

For example, an incoming message may contain: `238741905682147@lid`

The method returns the corresponding WhatsApp ID with the phone number.

### Retrieve the ID by LID

Use:

```bash
GET https://gate.whapi.cloud/contacts/ids/{ContactLID}
```

Replace `{ContactLID}` with the complete identifier ending in `@lid`.

#### Example request

```bash
curl --request GET \
  --url "https://gate.whapi.cloud/contacts/ids/238741905682147%40lid" \
  --header "accept: application/json" \
  --header "authorization: Bearer <CHANNEL_TOKEN>"
```

The `@` character in the URL is encoded as `%40`.

### Response

```json
{
  "id": "141555503672@s.whatsapp.net"
}
```

The value before `@s.whatsapp.net` is the phone number in international format: `141555503672`

You can then use it to find the customer in your CRM, update the contact record, or continue a workflow that requires a phone number.<br>

{% hint style="info" %}
This method does not send any direct requests to WhatsApp. It only searches the data already available in Whapi. This makes the process secure, does not place any additional load on your account, and does not increase the risk of it being blocked.

However, for the same reason, a successful result cannot be guaranteed. If WhatsApp has not yet provided us with a phone number associated with this LID, the response will indicate that no match was found. In that case, simply continue using the @lid as a regular identifier.

We continuously update our internal database of LID-to-number matches, so the likelihood of successfully resolving a LID increases over time.
{% endhint %}

### Recommended workflow

1. Receive or store the contact LID.
2. Use the LID directly for WhatsApp messaging.
3. Call `GET /contacts/ids/{ContactLID}` when the phone number is required.
4. Save the relationship between the LID and returned WhatsApp ID.

Example:

```json
{
  "lid": "238741905682147@lid",
  "whatsapp_id": "141555503672@s.whatsapp.net",
  "phone": "141555503672"
}
```
