# Detailed Guide to OAuth2 Authorization via LinkedIn

**URL:** https://community.integray.com/t/detailed-guide-to-oauth2-authorization-via-linkedin/289
**Category:** Handy solutions
**Tags:** oauth2
**Created:** [September 27, 2024, 5:30am UTC](https://community.integray.com/t/detailed-guide-to-oauth2-authorization-via-linkedin/289 "2024-09-27T05:30:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Veronika](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@Veronika](https://community.integray.com/u/Veronika)
#### Post date: [September 27, 2024, 5:30am UTC](https://community.integray.com/t/detailed-guide-to-oauth2-authorization-via-linkedin/289/1 "2024-09-27T05:30:46Z")

</div>

# Step-by-Step Setup 🚀

Let’s dive into the step-by-step process of setting up OAuth authorization in Integray using LinkedIn login.

The first step is to create your own “app” on the LinkedIn site: [Create a LinkedIn app](https://www.linkedin.com/developers/apps/new). This will provide the key information needed for authorization. 🔑

For the new application, you’ll need to fill out the following:

- **App name** 📝
- **LinkedIn Page** 🌐 (you can add a general page, no verification is required)
- **Upload logo** 🖼
- Agree to the terms by checking the **checkbox** ✅

 ![Snímek obrazovky 2024-09-27 v 7.06.59](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/b2f907e269ea3266384b5ce4effd95023ea84419.png)

Once completed, click **Save** 💾.

Next, add a product (for example, one shown in the screenshot) and agree to the terms and conditions. 📄

 ![Snímek obrazovky 2024-09-27 v 7.08.15](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/84e5316f9301a3f921db4e7623c7cfa68787cb17.png)

In the **Auth** tab, you will find the **Client ID** and **Client Secret** , fill in the **Redirect URL** , and determine the appropriate **Scope** (make sure to refresh the page if you don’t see available scopes).

Further steps for configuring the **Redirect URL** will be provided below. 🔒

 ![Snímek obrazovky 2024-09-27 v 7.12.43](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/d9dda2924427f773ff6deb5ee2ebdf1a59679049.png)

Now, let’s move over to Integray. ⚙

In the new **Authorizations** feature, we’ll create a new authorization by clicking **+Add** and selecting `OAuth2` as the provider.

## Settings ⚙

- **Login URL:** for LinkedIn it is `https://www.linkedin.com/oauth/v2/authorization` 🌍
- **Login query params:** use the pre-filled settings `response_type=code` 📝
- **Request offline\_access scope:** LinkedIn does not support this scope, so we will mark the checkbox as `False` 🚫
- **Client ID:** use the information from the **Auth** tab on the LinkedIn Developer site. 🔐
- **Client Secret:** use the information from the **Auth** tab on the LinkedIn Developer site. 🔐
- **Redirect URI:** predefined to the endpoint `api/Callback/GenericOAuth2` 🔄
- **Access Token URL:** for LinkedIn it is `https://www.linkedin.com/oauth/v2/accessToken` 🔑

 ![Snímek obrazovky 2024-09-27 v 7.20.40](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/fd15a9a0aff3c39c92bdefbf6b8b6a82300fe61e.png)

## Configuring connectors 🔗

Currently, it is recommended to use this authorization with the [Advanced Rest API Connector](https://learn.integray.app/connectoracademy/connectors/AdvancedRestAPI/4.7/).

For more details and specifications of endpoints, you can refer to the documentation in the **Endpoints** tab for the selected product, and for more detailed documentation, check the **View docs** tab. 📖

## Reviewing and Customizing Scopes 🔍

In the `Scopes` tab, you must define **custom scopes** to specify permissions according to your company’s needs, adhering to the principle of least privilege for enhanced security. 🛡

 ![Snímek obrazovky 2024-09-27 v 7.22.23](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/71e0e2371cd73f4674559a6f06e416baa6b24769.png)

As we saw in the **Auth** tab on LinkedIn for developers, **Scopes** are defined based on the product you choose for your app. In Integray, we need to input the same scopes; otherwise, the authorization will not work correctly. ❗

Once connectors and scopes are configured, the authorization setup is complete. The system is ready for secure interactions, click the **Authorize** button. ✅ This action will redirect you to the provider’s login page, where you will enter your credentials to sign in.

 ![Snímek obrazovky 2024-09-27 v 7.24.26](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/8d28568436e1f86e0360f57bb4180f7067cd0fc8.png)

During the login process, you must approve the **User consent screen** , which is a dialog or webpage presented by the authorization server. This screen informs you about the specific permissions or [Scopes](#scopes) the application requests access to. You must review these permissions and provide your consent to allow the application to access your data within the specified scope. 📋

 ![Snímek obrazovky 2024-09-27 v 7.25.47](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/6a06e12cedc0dafca39bea21520e94754cf40a5e.png)

After successful authentication, the status indicator will change from **Not authorized** to **Authorized** , confirming the authorization. 🔓

 ![Snímek obrazovky 2024-09-27 v 7.26.04](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/3bec62d363bee2af366a6d0d40f7f515f8c3ff9d.png)

Finally, click the **Save** button to store the new authorization. 💾

![Snímek obrazovky 2024-09-27 v 7.28.33](https://europe1.discourse-cdn.com/flex017/uploads/integray/original/1X/087e1f23666507843a93970da32bac7c7f266080.png)

Thanks for reading, and I hope this guide helps you with your setup! 🙂
