|
| 1 | +--- |
| 2 | +title: LinkedIn |
| 3 | +description: Add a bot to LinkedIn using the official integration. |
| 4 | +icon: '/integrations/integration-guides/assets/icons/linkedin.svg' |
| 5 | +tag: New |
| 6 | +--- |
| 7 | + |
| 8 | +{/* vale off */} |
| 9 | + |
| 10 | +import integrationVersions from '/snippets/integrations/versions.mdx' |
| 11 | +import { OpenInHub } from '/snippets/integrations/open-in-hub.jsx' |
| 12 | +import Cards from '/snippets/integrations/cards/botpress/linkedin.mdx' |
| 13 | + |
| 14 | +{/* vale on */} |
| 15 | + |
| 16 | +<OpenInHub integration={integrationVersions.linkedin}/> |
| 17 | + |
| 18 | +The official LinkedIn integration allows your bot to create and delete posts from your LinkedIn account. |
| 19 | + |
| 20 | +## Setup |
| 21 | + |
| 22 | +<Tabs> |
| 23 | + <Tab title="Basic configuration"> |
| 24 | + <Info> |
| 25 | + You will need: |
| 26 | + |
| 27 | + - A [published bot](/get-started/quick-start) |
| 28 | + - A [LinkedIn account](https://www.linkedin.com/signup) |
| 29 | + </Info> |
| 30 | + |
| 31 | + <Steps> |
| 32 | + <Step> |
| 33 | + In Botpress Studio, select **Explore Hub** in the upper-right corner. |
| 34 | + </Step> |
| 35 | + <Step> |
| 36 | + Search for the **LinkedIn** integration, then select **Install Integration**. |
| 37 | + </Step> |
| 38 | + <Step> |
| 39 | + In the **Configuration** menu, select **Authorize LinkedIn**. |
| 40 | + </Step> |
| 41 | + <Step> |
| 42 | + Follow the on-screen instructions to connect Botpress to your LinkedIn account. |
| 43 | + </Step> |
| 44 | + </Steps> |
| 45 | + |
| 46 | + <Note> |
| 47 | + 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. |
| 48 | + </Note> |
| 49 | + |
| 50 | + </Tab> |
| 51 | + <Tab title="Manual configuration"> |
| 52 | + |
| 53 | + For advanced use cases, you can manually configure the integration using your own LinkedIn application and OAuth credentials. |
| 54 | + |
| 55 | + <Info> |
| 56 | + You will need: |
| 57 | + |
| 58 | + - A [published bot](/get-started/quick-start) |
| 59 | + - A [LinkedIn account](https://www.linkedin.com/signup) |
| 60 | + - A [LinkedIn Page](https://www.linkedin.com/help/linkedin/answer/a543852) associated with your app |
| 61 | + </Info> |
| 62 | + |
| 63 | + ### Step 1: Create a LinkedIn application |
| 64 | + |
| 65 | + <Steps> |
| 66 | + <Step> |
| 67 | + Go to the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps) and select **Create app**. |
| 68 | + </Step> |
| 69 | + <Step> |
| 70 | + Fill in the required fields: |
| 71 | + - **App name** |
| 72 | + - **LinkedIn Page** |
| 73 | + - **App logo** |
| 74 | + </Step> |
| 75 | + <Step> |
| 76 | + Select **Create app**. |
| 77 | + </Step> |
| 78 | + </Steps> |
| 79 | + |
| 80 | + ### Step 2: Configure OAuth settings |
| 81 | + |
| 82 | + <Steps> |
| 83 | + <Step> |
| 84 | + In your LinkedIn application settings, navigate to the **Products** tab. |
| 85 | + </Step> |
| 86 | + <Step> |
| 87 | + Request access to the following products: |
| 88 | + - **Share on LinkedIn** — required for posting content |
| 89 | + - **Sign In with LinkedIn using OpenID Connect** — required for authentication |
| 90 | + |
| 91 | + <Note> |
| 92 | + Approval may require review by LinkedIn. |
| 93 | + </Note> |
| 94 | + </Step> |
| 95 | + <Step> |
| 96 | + Navigate to the **Auth** tab. |
| 97 | + </Step> |
| 98 | + <Step> |
| 99 | + Under **OAuth 2.0 settings**, add the following redirect URL: |
| 100 | + |
| 101 | + ``` |
| 102 | + https://webhook.botpress.cloud/oauth |
| 103 | + ``` |
| 104 | + </Step> |
| 105 | + <Step> |
| 106 | + Copy your **Client ID** and **Client Secret** — you'll need them to configure the integration in Botpress. |
| 107 | + </Step> |
| 108 | + </Steps> |
| 109 | + |
| 110 | + ### Step 3: Obtain an authorization code |
| 111 | + |
| 112 | + <Steps> |
| 113 | + <Step> |
| 114 | + Construct the authorization URL by replacing `YOUR_CLIENT_ID` in the following URL with your actual Client ID: |
| 115 | + |
| 116 | + ``` |
| 117 | + 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 |
| 118 | + ``` |
| 119 | + </Step> |
| 120 | + <Step> |
| 121 | + Visit this URL in your browser while logged into the LinkedIn account you want to use with the integration. |
| 122 | + </Step> |
| 123 | + <Step> |
| 124 | + Follow the on-screen instructions to authorize the application. |
| 125 | + </Step> |
| 126 | + <Step> |
| 127 | + You will be redirected to `webhook.botpress.cloud`. Do not close this page. |
| 128 | + </Step> |
| 129 | + <Step> |
| 130 | + Copy the **authorization code** from the URL in your browser's address bar. |
| 131 | + |
| 132 | + <Note> |
| 133 | + The authorization code is the string that appears after `code=` in the URL. |
| 134 | + </Note> |
| 135 | + </Step> |
| 136 | + </Steps> |
| 137 | + |
| 138 | + ### Step 4: Configure the integration in Botpress |
| 139 | + |
| 140 | + <Steps> |
| 141 | + <Step> |
| 142 | + In Botpress Studio, select **Explore Hub** in the upper-right corner. |
| 143 | + </Step> |
| 144 | + <Step> |
| 145 | + Search for the **LinkedIn** integration, then select **Install Integration**. |
| 146 | + </Step> |
| 147 | + <Step> |
| 148 | + In the **Configuration** menu, select the drop-down and choose **Manual**. |
| 149 | + </Step> |
| 150 | + </Steps> |
| 151 | + |
| 152 | + Fill in the integration's configuration fields: |
| 153 | + |
| 154 | + <AccordionGroup> |
| 155 | + <Accordion title="Client ID"> |
| 156 | + Paste the Client ID you copied from the **Auth** tab in the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps). |
| 157 | + </Accordion> |
| 158 | + <Accordion title="Client Secret"> |
| 159 | + Paste the Client Secret you copied from the **Auth** tab in the [LinkedIn Developer Portal](https://www.linkedin.com/developers/apps). |
| 160 | + </Accordion> |
| 161 | + <Accordion title="Authorization Code"> |
| 162 | + Paste the authorization code you obtained in [Step 3](#step-3-obtain-an-authorization-code). |
| 163 | + |
| 164 | + <Warning> |
| 165 | + 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. |
| 166 | + </Warning> |
| 167 | + </Accordion> |
| 168 | + </AccordionGroup> |
| 169 | + |
| 170 | + When you've filled in all the fields, select **Save Configuration**. |
| 171 | + |
| 172 | + <Check> |
| 173 | + Your LinkedIn integration has been manually configured and is ready to use. |
| 174 | + </Check> |
| 175 | + |
| 176 | + </Tab> |
| 177 | +</Tabs> |
| 178 | + |
| 179 | +--- |
| 180 | + |
| 181 | +## Cards |
| 182 | + |
| 183 | +<Cards /> |
0 commit comments