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

# Get All LID to Number Mappings

> Get all LID (Local ID) to phone number mappings

## Description

This endpoint returns all known mappings between LIDs (Local IDs) and phone numbers. LID is a local identifier used by WhatsApp to map contacts efficiently.

## URL Parameters

<ParamField path="session" type="string" required>
  Unique authenticated session ID
</ParamField>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "lids": [
      {
        "lid": "12345678901234567890",
        "phone": "5511999999999"
      },
      {
        "lid": "09876543210987654321",
        "phone": "5511888888888"
      }
    ]
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Mappings returned successfully
* `401` - Unauthorized session
* `404` - Session not found

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://api.wappfy.com.br/api/my-session/lids
  ```

  ```javascript JavaScript theme={null}
  const session = 'my-session';
  const response = await fetch(`https://api.wappfy.com.br/api/${session}/lids`);
  const data = await response.json();
  console.log(`Total LIDs: ${data.lids.length}`);
  data.lids.forEach(mapping => {
    console.log(`LID: ${mapping.lid} -> Phone: ${mapping.phone}`);
  });
  ```

  ```python Python theme={null}
  import requests

  session = 'my-session'
  response = requests.get(f'https://api.wappfy.com.br/api/{session}/lids')
  data = response.json()
  print(f"Total LIDs: {len(data['lids'])}")
  for mapping in data['lids']:
      print(f"LID: {mapping['lid']} -> Phone: {mapping['phone']}")
  ```
</CodeGroup>


## OpenAPI

````yaml viewer-en.json get /api/{session}/lids
openapi: 3.1.0
info:
  title: Wappfy - WhatsApp HTTP API
  version: '2.0'
  contact: {}
servers:
  - url: https://{host}
    description: Customizable Server
    variables:
      host:
        default: api.wappfy.com.br
        description: Server URL (e.g., api.wappfy.com.br or your-server.com)
security:
  - api_key: []
tags:
  - name: 🖥️ Sessions
    description: Control WhatsApp sessions (accounts)
  - name: 🔑 Auth
    description: Authentication
  - name: 🆔 Profile
    description: Your profile information
  - name: 🖼️ Screenshot
    description: Get WhatsApp screenshot and display QR code
  - name: 📤 Chatting
    description: Conversation methods
  - name: 📢 Channels
    description: Channels (newsletters) methods
  - name: 🟢 Status
    description: Status (aka stories) methods
  - name: 💬 Chats
    description: Conversations methods
  - name: 👤 Contacts
    description: |-
      Contacts methods.<br>
                      Use phone number (without +) or phone number and `@c.us` at the end as `contactId`.<br>
                      E.g: `12312312310` OR `12312312310@c.us`<br>
  - name: 👥 Groups
    description: Groups methods.<br>
  - name: ✅ Presence
    description: Presence information
  - name: 📅 Events
    description: Event Message
  - name: 🏷️ Labels
    description: Labels - available only for WhatsApp Business accounts
  - name: 🔍 Observability
    description: Other methods
  - name: 🗄️ Storage
    description: Storage methods
externalDocs:
  description: Wappfy - WhatsApp API
  url: https://docs.wappfy.com.br/
paths:
  /api/{session}/lids:
    get:
      tags:
        - 👤 Contacts
      summary: Get mapping of all known lids to phone number
      description: The {session} parameter must be the session's instanceName.
      operationId: LidsController_getAll
      parameters:
        - name: limit
          required: false
          in: query
          schema:
            default: 100
            type: number
        - name: offset
          required: false
          in: query
          schema:
            type: number
            default: 0
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LidToPhoneNumber'
      security:
        - api_key: []
components:
  schemas:
    LidToPhoneNumber:
      type: object
      properties:
        lid:
          type: string
          description: User's linked ID
          example: 1111111@lid
        pn:
          type: string
          description: User's phone number (chat id)
          example: 3333333@c.us
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````