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

# Connecting a LinkedIn Identity

> Learn to manage LinkedIn authentication and identity integrations in Edges.

## LinkedIn licence compatibility

What an account can do through Edges depends on its LinkedIn licence. Check this before connecting — it decides InMail volume, invitation notes and which Sales Navigator actions are available at all.

| **License** | **Edges Level** | **Edges Compatibility** | **InMails/Month** | **Invitations with Note** | **CRM Integration** |
| - | - | - | - | - | - |
| **LinkedIn Basic** | Classic | ✅ Yes | 0 | 5/month | No |
| **LinkedIn Premium Career** | Classic | ❌ No | 5 | N/A | No |
| **LinkedIn Premium Business** | Premium | ✅ Yes | 15 | 400 | No |
| **Sales Navigator Core** | Sales Navigator | ✅ Yes | 50 | 400 | No |

Today Edges handles LinkedIn Basic, LinkedIn Premium Business, and Sales Navigator Core which are defined as `level` in the LinkedIn integration.

## Create the identity first

A LinkedIn account is always attached to an identity, so the identity has to exist first — including its `timezone`, which must match the location the account logs in from.

<Card title="Create an Identity" icon="user-plus" href="/v1/identities/add-manage-identities">
  Create the identity, set its timezone, and save the returned `uid`.
</Card>

## Connect a LinkedIn account

Attach the LinkedIn account with [Connect an Identity's Integration](/v1/api/integrations/connect). LinkedIn accepts two authentication types: **BASIC** — an email and password — and **COOKIES**.

<Tip>
  Start with native login. It is the shorter path, and Edges refreshes the session for you.
</Tip>

### 1. Native login (recommended)

Give Edges the LinkedIn email and password and it handles the authentication flow, including the checkpoints LinkedIn raises. Choose this when:

* You want the simpler integration
* You don't want to manage cookies
* You want cookies refreshed automatically

```bash theme={null}
curl --request POST \
  --url https://api.edges.run/v1/identities/{identity_uid}/integrations/linkedin \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "auth_data": {
    "basic": {
      "username": "elon@musk.com",
      "password": "********"
    }
  }
}'
```

<Note>**Important**: we encrypt everything for security reasons.</Note>

#### Send your user a login link

To simplify integration setup for your users, we handle all authentication complexity automatically.
Rather than building custom login forms and managing credentials, Edges issues secure, time-limited URLs (valid for 48 hours) that let users connect their accounts seamlessly.

These login links work with supported integrations like LinkedIn without requiring browser extensions or custom form handling.

When you create an Identity using our [Identity creation endpoint](/v1/api/identities/create), you'll receive these login links in the response:

```json theme={null}
{
  "uid": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2023-10-01T12:00:00Z",
  "workspace_uid": "5678e456-e89b-12d3-a456-426614174001",
  "name": "John Doe",
  "timezone": "Europe/Paris",
  "integrations": [],
  "identity_login_links": {
    "linkedin": "https://app.edges.run/identities/linkedin/login?token=XXXXXX"
  }
}
```

You can share the login URL ([https://app.edges.run/identities/linkedin/login?token=XXXXXX](https://app.edges.run/identities/linkedin/login?token=XXXXXX)) via email, or embed it directly in your product interface as a button or link.

When clicked, users are taken to our secure, white-labeled authentication page to complete the LinkedIn connection process.

<Tip>
  This feature eliminates the need for browser extensions or custom login forms. Users can securely connect their LinkedIn accounts by simply visiting the provided login link, which works across all browsers and supports all security methods (including SMS, authenticator apps, and in-app confirmations).
</Tip>

If you need to generate new login links (for example, if the previous one expired), you can use the [Generate Login Links](/v1/api/identities/login-links) endpoint.

### 2. Cookies

Send the LinkedIn cookies yourself — `li_at`, and `li_a` as well for Sales Navigator. This means **you have to obtain them**, either from your own browser extension or by having your user install Edges's. Choose this when:

* You already have the cookies from your own Chrome extension
* You want to handle authentication yourself
* You need precise control over cookie management

```bash theme={null}
curl --request POST \
  --url https://api.edges.run/v1/identities/{identity_uid}/integrations/linkedin \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <your_api_key>' \
  --data '{
  "account_name": "LinkedIn Account #1",
  "auth_data": {
    "cookies": {
      "li_at": "<li_at_token>",
      "li_a": "<li_a_token>"
    }
  }
}'
```

<ParamField body="account_name" type="string">
  Name of the LinkedIn account, e.g. "LinkedIn Account #1". It's generally the
  User's `full_name` or `email`.
</ParamField>

<ParamField body="auth_data.cookies" type="object">
  For **COOKIES** integration types, provide authentication cookies here.

  <Note>
    **Important note**: If you're connecting an account for **LinkedIn Sales
    Navigator**, you need to send both cookies. If you don't include the `li_a`
    token, the connection may not work properly with LinkedIn Sales Navigator.
    Including the `li_a` token will also speed up account synchronization.
  </Note>
</ParamField>

#### Use the Edges Chrome Extension (Grey Label)

An alternative to the native login link is to use Edges's connection flow, which allows you to connect your users' accounts through our Chrome Extension.

Once the identity is created and you have the `identity_uid`, you can generate a connection link that will open the Edges Chrome Extension. The link format is:

`https://app.edges.run/integrations/linkedin/identities/{identity_uid}`

Replace `{identity_uid}` with the actual identity UID you received from the identity creation.

For example, if the identity UID of your new user is `ae369a13-dbd7-493a-bc05-dbbc49ca6c22`, the connection link would look like this:

```plaintext theme={null}
https://app.edges.run/integrations/linkedin/identities/ae369a13-dbd7-493a-bc05-dbbc49ca6c22
```

Share this link with your user, and they will install the Edges Chrome Extension to sync their account. Their LinkedIn account will then be linked to their Edges user.

<Note>
  The shared link is the same as the one you can get on your workspace at [https://app.edges.run/integrations/linkedin](https://app.edges.run/integrations/linkedin) for an existing identity. It will open the Edges Chrome Extension, which will handle the connection process.

  To understand the process, you can complete it directly on your workspace. See this step-by-step guide: [https://support.edges.run/en/articles/11588406-how-to-connect-an-identity-to-linkedin](https://support.edges.run/en/articles/11588406-how-to-connect-an-identity-to-linkedin).
</Note>

## Related

<CardGroup cols={3}>
  <Card title="Timezone & VPN Settings" icon="globe" href="/v1/identities/add-manage-identities#timezone--vpn-settings">
    The timezone is set on the identity, before you connect. A mismatch with the login location is a common cause of failure.
  </Card>

  <Card title="LinkedIn Smart Limits" icon="gauge-high" href="/v1/linkedin/limits">
    The quotas Edges enforces to protect connected accounts.
  </Card>

  <Card title="Identity Modes" icon="users" href="/v1/identities/modes">
    How a run picks which account to use — `direct`, `auto` or `managed`.
  </Card>
</CardGroup>

<Card title="Monitor & Recover" icon="heart-pulse" href="/v1/identities/linkedin-recovery" horizontal>
  Read next — watch the integration with webhooks, and reconnect it when it goes invalid.
</Card>


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