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

# LinkedIn

> Add a bot to LinkedIn using the official integration.

{/* vale on */}

[Open in Hub](https://studio.botpress.cloud/home?exploreHub=1\&hubItemId=intver_01KN89RB1CBCP1MGAYEBHMCT5Q)
*v0.1.3*

The official LinkedIn integration allows your bot to create and delete posts from your LinkedIn account.

## Setup

> [tab] Basic configuration
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [LinkedIn account](https://www.linkedin.com/signup)
>
> **Step 1**
>
> In Botpress Studio, select **Explore Hub** in the upper-right corner.
>
> **Step 2**
>
> Search for the **LinkedIn** integration, then select **Install Integration**.
>
> **Step 3**
>
> In the **Configuration** menu, select **Authorize LinkedIn**.
>
> **Step 4**
>
> Follow the on-screen instructions to connect Botpress to your LinkedIn account.
>
> > [!NOTE]
> >
> > When using this configuration mode, a Botpress-managed LinkedIn application connects to your LinkedIn account. Actions taken by the bot will be attributed to the LinkedIn account that authorized the connection.

> [tab] Manual configuration
>
> For advanced use cases, you can manually configure the integration using your own LinkedIn application and OAuth credentials.
>
> > [!NOTE]
> >
> > You will need:
> >
> > * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> > * A [LinkedIn account](https://www.linkedin.com/signup)
> > * A [LinkedIn Page](https://www.linkedin.com/help/linkedin/answer/a543852) associated with your app
>
> ### Step 1: Create a LinkedIn application
>
> **Step 1**
>
> Go to the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps) and select **Create app**.
>
> **Step 2**
>
> Fill in the required fields:
>
> * **App name**
> * **LinkedIn Page**
> * **App logo**
>
> **Step 3**
>
> Select **Create app**.
>
> ### Step 2: Configure OAuth settings
>
> **Step 1**
>
> In your LinkedIn application settings, navigate to the **Products** tab.
>
> **Step 2**
>
> Request access to the following products:
>
> * **Share on LinkedIn** — required for posting content
>
> * **Sign In with LinkedIn using OpenID Connect** — required for authentication
>
> > [!NOTE]
> >
> > Approval may require review by LinkedIn.
>
> **Step 3**
>
> Navigate to the **Auth** tab.
>
> **Step 4**
>
> Under **OAuth 2.0 settings**, add the following redirect URL:
>
> ```
> https://webhook.botpress.cloud/oauth
> ```
>
> **Step 5**
>
> Copy your **Client ID** and **Client Secret** — you'll need them to configure the integration in Botpress.
>
> ### Step 3: Obtain an authorization code
>
> **Step 1**
>
> Construct the authorization URL by replacing `YOUR_CLIENT_ID` in the following URL with your actual Client ID:
>
> ```
> https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=https://webhook.botpress.cloud/oauth&scope=openid%20profile%20email%20w_member_social&state=manual
> ```
>
> **Step 2**
>
> Visit this URL in your browser while logged into the LinkedIn account you want to use with the integration.
>
> **Step 3**
>
> Follow the on-screen instructions to authorize the application.
>
> **Step 4**
>
> You will be redirected to `webhook.botpress.cloud`. Do not close this page.
>
> **Step 5**
>
> Copy the **authorization code** from the URL in your browser's address bar.
>
> > [!NOTE]
> >
> > The authorization code is the string that appears after `code=` in the URL.
>
> ### Step 4: Configure the integration in Botpress
>
> **Step 1**
>
> In Botpress Studio, select **Explore Hub** in the upper-right corner.
>
> **Step 2**
>
> Search for the **LinkedIn** integration, then select **Install Integration**.
>
> **Step 3**
>
> In the **Configuration** menu, select the drop-down and choose **Manual**.
>
> Fill in the integration's configuration fields:
>
> > [accordion] Client ID
> >
> > Paste the Client ID you copied from the **Auth** tab in the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps).
>
> > [accordion] Client Secret
> >
> > Paste the Client Secret you copied from the **Auth** tab in the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps).
>
> > [accordion] Authorization Code
> >
> > Paste the authorization code you obtained in [Step 3](#step-3-obtain-an-authorization-code).
> >
> > > [!WARNING]
> > >
> > > The authorization code is only valid for a short period of time. If the code has expired, repeat [Step 3](#step-3-obtain-an-authorization-code) to obtain a new one.
>
> When you've filled in all the fields, select **Save Configuration**.
>
> > [!TIP]
> >
> > Your LinkedIn integration has been manually configured and is ready to use.

***

## Cards

{/* vale off */}

Here's a reference for all [Cards](https://botpress.com/docs/studio/concepts/cards/introduction.md) available with the integration:

### Create Post

Create a LinkedIn post with optional image or article link

**input** `object`

**text** `string` *required*

The text content of your LinkedIn post (required, max 3000 characters)

**visibility** `enum\<string\>` *required*

Who can see this post: PUBLIC (anyone) or CONNECTIONS (1st degree only)

Available options: `PUBLIC`, `CONNECTIONS`

**imageUrl** `string (uri)`

URL of an image to attach (JPG, PNG, GIF, max 8MB). The image will be downloaded and uploaded to LinkedIn. If both imageUrl and articleUrl are provided, only the image will be used.

**articleUrl** `string (uri)`

URL of an article/link to share. LinkedIn will generate a preview card. Ignored if imageUrl is provided.

**articleTitle** `string`

Custom title for the article preview.

**articleDescription** `string`

Custom description for the article preview (optional - LinkedIn will scrape from URL if not provided)

**output** `object`

**postUrn** `string` *required*

The URN identifier of the created post (e.g., urn:li:ugcPost:123456)

**postUrl** `string` *required*

Direct link to view the post on LinkedIn

### Delete Post

Delete a LinkedIn post created by the authenticated user

**input** `object`

**postUrn** `string` *required*

The URN of the post to delete (e.g., urn:li:ugcPost:123456 or urn:li:share:123456)

**output** `object`

**success** `boolean` *required*

Whether the post was successfully deleted


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