# Connect Apps to LinkedIn

## Prerequisite

* A LinkedIn Developer profile. You can create one on the [LinkedIn Developers Portal](https://developer.linkedin.com/).
* LinkedIn App

### Step 1: Create a LinkedIn App

Log in to the [LinkedIn Developers Portal](https://developer.linkedin.com/) and create a new app or update the configuration for an existing one.

Go to the **Auth** tab of your LinkedIn app and take note of the "Client ID" and "Client Secret".

Also, add `https://<YOUR_AUTHGEAR_ENDPOINT>/sso/oauth2/callback/linkedin` to "Authorized redirect URLs" under "OAuth 2.0 settings" section.

<figure><img src="/files/HU1il23HE6im8QqsFRqQ" alt=""><figcaption><p>LinkedIn app, "Auth" tab</p></figcaption></figure>

{% hint style="info" %}
The redirect URI has the form of `/sso/oauth2/callback/:alias`. The `alias` is used as the identifier of OAuth provider. You can configure the `alias` in Authgear Portal
{% endhint %}

Next, open the **Products** tab of your LinkedIn app, and request access to "Sign In with LinkedIn using OpenID Connect."

<figure><img src="/files/Kf8GsNMlrgMZepZYKb6H" alt=""><figcaption><p>LinkedIn app product list</p></figcaption></figure>

### Step 2: Configure Sign in with LinkedIn through the portal

In the Authgear Portal, go to **Authentication** > **Social / Enterprise Login**.

Enable **Sign in with LinkedIn**.

Then fill in the **Client ID**. and **Client Secret** from your LinkedIn app.

**Save** the settings.

🎉 Done! You have just added LinkedIn Login to your apps!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.authgear.com/authentication-and-access/social-enterprise-login-providers/social-login-providers/linkedin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
