3.6 KiB
Connect your Botpress chatbot to LinkedIn to share posts and engage with your professional network. This integration enables your bot to interact with LinkedIn's API using OAuth authentication.
Configuration
The LinkedIn integration requires OAuth authentication to establish a secure connection between Botpress and LinkedIn. You can configure the integration using either automatic or manual configuration methods.
Automatic configuration with OAuth
To set up the LinkedIn integration using automatic configuration, click the authorization button and follow the on-screen instructions to connect your Botpress chatbot to LinkedIn.
When using this configuration mode, a Botpress-managed LinkedIn application will be used to connect to your LinkedIn account. Actions taken by the bot will be attributed to the LinkedIn account that authorized the connection.
Configuring the integration in Botpress
- Authorize the LinkedIn integration by clicking the authorization button.
- Follow the on-screen instructions to connect your Botpress chatbot to LinkedIn.
- Once the connection is established, you can save the configuration and enable the integration.
Manual configuration with OAuth
To set up the LinkedIn integration manually, you must create a LinkedIn application and configure OAuth credentials. You will also need to obtain an authorization code and configure the integration in Botpress.
Creating a LinkedIn Application
- Go to the LinkedIn Developer Portal.
- Click the
Create appbutton. - Fill in the required information:
- App name
- LinkedIn Page (you must associate your app with a LinkedIn Page)
- App logo
- Legal agreement
- Click
Create appto create your application.
Configuring OAuth Settings
- In your LinkedIn application settings, navigate to the
Productstab. - Request access to the following products:
Share on LinkedIn- Required for posting contentSign In with LinkedIn using OpenID Connect- Required for authentication
- Wait for approval (this may be instant or require review by LinkedIn).
- Navigate to the
Authtab. - Under
OAuth 2.0 settings, add the following redirect URL:https://webhook.botpress.cloud/oauth - Copy your Client ID and Client Secret for use in the next steps.
Authorizing the OAuth Application
-
Construct the authorization URL with your 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=manualReplace
YOUR_CLIENT_IDwith your actual Client ID. -
Visit this URL in your browser while logged into the LinkedIn account you want to use with the integration.
-
Follow the on-screen instructions to authorize the application.
-
You will be redirected to
webhook.botpress.cloud. Do not close this page. -
Copy the authorization code from the URL in your browser's address bar.
The authorization code is the string that appears after
code=in the URL. -
You may now safely close this page.
Configuring the integration in Botpress
- Select the
Manualconfiguration mode in the Botpress integration settings. - Enter your LinkedIn Client ID and Client Secret.
- Enter the authorization code you obtained in the previous step.
The authorization code is only valid for a short period of time. If the code has expired, you will need to repeat the authorization steps to obtain a new code.
- Save the configuration and enable the integration.