How to create Oauth2 config for LinkedIn

How to create Oauth2 config for LinkedIn

In this guide, I will share the process for customizing the auth config for LinkedIn. So, let's begin.

Setting up LinkedIn

In this section, we’ll go through the process of creating an application and setting up LinkedIn to access the Client ID and Client Secret.

NOTE: If you already have an application in LinkedIn (for developers) and can access the Client ID and Client Secret, you can skip to Step 3.

Step 1: Create an application

Visit LinkedIn Developer Solutions and create a new application by clicking on the Create app button.

Now, enter the basic required app details, like the App name, Company page URL, and the logo that users will see when they authorize with your app.

Read and agree to the legal terms, and if everything sounds good, finally create your application by clicking on the Create App button.

Step 2: Copy the OAuth Credentials

Once your application is created, you can easily access the Client ID and Client Secret.

  1. Navigate to the application you just created.

  2. Under the Auth tab, in the Application credentials section, you can find the Client ID and Client Secret.

Note these somewhere because we will need them when configuring Composio.

Step 3: Set the Authorized Redirect URI

You’ll also need to configure the Authorized Redirect URI of the application to point to Composio’s callback URL.

In the Auth tab, just below Application Credentials in the OAuth 2.0 Settings add the following URL:

<https://backend.composio.dev/api/v3/toolkits/auth/callback>

Optionally, you can also change some default settings, check analytics, or add new team members to your application.

That's all you need to do to set up on the LinkedIn side.

Creating the Auth Config in Composio

With your OAuth credentials ready, navigate to the Composio dashboard for your project to configure the authentication settings for LinkedIn.

  1. Click on the Create Auth Config button to get a list of all the toolkits available.

In the sidebar that opens, choose LinkedIn for the toolkit. Ensure the authentication is set to OAuth2 as the default. There is no support for Bearer Token with LinkedIn.

Also, make sure to check "Use your own developer authentication" because that's the main purpose.

  1. Paste the Client ID and Client Secret you just copied from LinkedIn into their respective fields.

Then, simply click Create LinkedIn Auth Config.

Once you have set up the auth config for LinkedIn, you can go to the Manage Auth Config tab to make changes to any auth config fields. Here, you can also customize the auth scopes if needed. Default scopes are already pre-filled for most apps.

Once done, copy the auth config ID (which starts with ac_) and use it in your application code via a secret manager.

Your custom LinkedIn auth config is now ready to go! 🚀

In this guide, I will share the process for customizing the auth config for LinkedIn. So, let's begin.

Setting up LinkedIn

In this section, we’ll go through the process of creating an application and setting up LinkedIn to access the Client ID and Client Secret.

NOTE: If you already have an application in LinkedIn (for developers) and can access the Client ID and Client Secret, you can skip to Step 3.

Step 1: Create an application

Visit LinkedIn Developer Solutions and create a new application by clicking on the Create app button.

Now, enter the basic required app details, like the App name, Company page URL, and the logo that users will see when they authorize with your app.

Read and agree to the legal terms, and if everything sounds good, finally create your application by clicking on the Create App button.

Step 2: Copy the OAuth Credentials

Once your application is created, you can easily access the Client ID and Client Secret.

  1. Navigate to the application you just created.

  2. Under the Auth tab, in the Application credentials section, you can find the Client ID and Client Secret.

Note these somewhere because we will need them when configuring Composio.

Step 3: Set the Authorized Redirect URI

You’ll also need to configure the Authorized Redirect URI of the application to point to Composio’s callback URL.

In the Auth tab, just below Application Credentials in the OAuth 2.0 Settings add the following URL:

<https://backend.composio.dev/api/v3/toolkits/auth/callback>

Optionally, you can also change some default settings, check analytics, or add new team members to your application.

That's all you need to do to set up on the LinkedIn side.

Creating the Auth Config in Composio

With your OAuth credentials ready, navigate to the Composio dashboard for your project to configure the authentication settings for LinkedIn.

  1. Click on the Create Auth Config button to get a list of all the toolkits available.

In the sidebar that opens, choose LinkedIn for the toolkit. Ensure the authentication is set to OAuth2 as the default. There is no support for Bearer Token with LinkedIn.

Also, make sure to check "Use your own developer authentication" because that's the main purpose.

  1. Paste the Client ID and Client Secret you just copied from LinkedIn into their respective fields.

Then, simply click Create LinkedIn Auth Config.

Once you have set up the auth config for LinkedIn, you can go to the Manage Auth Config tab to make changes to any auth config fields. Here, you can also customize the auth scopes if needed. Default scopes are already pre-filled for most apps.

Once done, copy the auth config ID (which starts with ac_) and use it in your application code via a secret manager.

Your custom LinkedIn auth config is now ready to go! 🚀