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

# Get Links

> Get Links

Get Links

```http theme={null}
GET https://services.leadconnectorhq.com/links/
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Query parameters

<ParamField query="locationId" type="string" required default="ve9EPM428h8vShlRW1KT" />

## Respuestas

<Accordion title="200 - Successful response">
  <ResponseField name="links" type="object[]">
    <Expandable title="cada item">
      <ResponseField name="id" type="string" default="n4AriwEnFrGh3tu08W0U" />

      <ResponseField name="name" type="string" default="first tag" />

      <ResponseField name="redirectTo" type="string" default="https://www.google.com/" />

      <ResponseField name="fieldKey" type="string" default="{{trigger_link.n4AriwEnFrGh3tu08W0U}}" />

      <ResponseField name="locationId" type="string" default="ve9EPM428h8vShlRW1KT" />
    </Expandable>
  </ResponseField>

  ```json theme={null}
  {
    "links": [
      {
        "id": "n4AriwEnFrGh3tu08W0U",
        "name": "first tag",
        "redirectTo": "https://www.google.com/",
        "fieldKey": "{{trigger_link.n4AriwEnFrGh3tu08W0U}}",
        "locationId": "ve9EPM428h8vShlRW1KT"
      }
    ]
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://services.leadconnectorhq.com/links/' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/links/', {
    method: 'GET',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
    },
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'GET',
      'https://services.leadconnectorhq.com/links/',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
      },
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/links/');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'GET',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
      ],
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
