> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hypersender.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contacts

> Look up WhatsApp contacts and resolve LIDs to phone numbers with the Hypersender Laravel SDK

## Overview

Look up information about WhatsApp contacts.

## 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)](https://docs.hypersender.com/v2/hypersender/overview/whatsapp/whatsapp-lid-issue.md)

### Get Phone Number by LID

Resolve a LID to the contact's phone-number chat ID. [(learn more)](https://docs.hypersender.com/v2/api-reference/whatsapp/contacts/get-phone-number-by-lid.md)

> [tab] Basic Usage
>
> ```php theme={null}
> use Hypersender\Hypersender;
>
> $mapping = Hypersender::whatsapp()
>   ->getPhoneNumberByLid(lid: '1111111@lid')
>   ->json();
>
> // ['lid' => '1111111@lid', 'pn' => '3333333@c.us']
> ```

> [tab] Parameters
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | lid | string | yes | The LID to resolve, e.g. `1111111@lid` or `1111111` |

### Get LID by Phone Number

Find the LID linked to a phone number. [(learn more)](https://docs.hypersender.com/v2/api-reference/whatsapp/contacts/get-lid-by-phone-number.md)

> [tab] Basic Usage
>
> ```php theme={null}
> use Hypersender\Hypersender;
>
> $mapping = Hypersender::whatsapp()
>   ->getLidByPhoneNumber(phoneNumber: '3333333@c.us')
>   ->json();
>
> // ['lid' => '1111111@lid', 'pn' => '3333333@c.us']
> ```

> [tab] Parameters
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | phoneNumber | string | yes | The phone number to resolve, e.g. `3333333@c.us` or `3333333` |

### Get All Known LIDs

List the LID to phone number mappings the instance knows about. [(learn more)](https://docs.hypersender.com/v2/api-reference/whatsapp/contacts/get-all-known-lids.md)

> [tab] Basic Usage
>
> ```php theme={null}
> use Hypersender\Hypersender;
>
> $mappings = Hypersender::whatsapp()
>   ->getAllKnownLids(limit: 100, offset: 0)
>   ->json();
>
> // [['lid' => '1111111@lid', 'pn' => '3333333@c.us'], ...]
> ```

> [tab] Parameters
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | limit | int | no | Maximum number of mappings to return (default: 100) |
> | offset | int | no | Number of mappings to skip (default: 0) |

### Get LIDs Count

Get how many LID mappings the instance knows about. [(learn more)](https://docs.hypersender.com/v2/api-reference/whatsapp/contacts/get-count-of-lids.md)

> [tab] Basic Usage
>
> ```php theme={null}
> use Hypersender\Hypersender;
>
> $count = Hypersender::whatsapp()
>   ->getLidsCount()
>   ->json('count');
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.