- 2 Minutes to read
- Print
- DarkLight
- PDF
LinkedIn Ads Connection
- 2 Minutes to read
- Print
- DarkLight
- PDF
Introduction
This document provides a comprehensive guide on connecting Rivery to LinkedIn Ads. It explains the connection process both using a LinkedIn user and a Custom Application. Additionally, it highlights the steps required for LinkedIn’s auto-refresh token mechanism and details what to do if the client does not have a custom app.
Connecting Using LinkedIn User
To connect with a LinkedIn user:
- Click on the Connect With LinkedIn button.
- In the pop-up window, enter your LinkedIn username and password.
- Approve Rivery's access to LinkedIn Ads reporting data.
Once authorized, Rivery will be able to pull LinkedIn Ads data for your reporting needs.
Connecting Using a Custom Application (Required for Auto-Refresh Token Mechanism)
Auto-Refresh Token Mechanism
To utilize LinkedIn’s auto-refresh token feature, a custom application is required. This ensures that tokens are automatically refreshed without user intervention every 60 days.
Requirements for creating a custom LinkedIn connection:
- A valid LinkedIn application.
- Scopes
r_ads_reporting
andr_ads
enabled for the application. - A personal LinkedIn account.
Steps to create a new LinkedIn Ads connection:
- Go to Create a new connection in Rivery.
- Enter a connection name.
- Provide the client ID and client secret of your LinkedIn application. You can find these details on the main screen of your LinkedIn application.
- Add the Rivery Authorized Redirect URL to your LinkedIn app:
- Insert
https://console.rivery.io/api/oauthcallback/linkedin
into the "Authorized Redirect URLs" list. - Click Add and then Update to save the changes.
- Insert
- In Rivery, enter the client ID, client secret, and the necessary scopes, and then click Connect With LinkedIn.
- A LinkedIn login pop-up will appear. Enter your credentials and approve access.
- Test the connection to verify if it's capable of handling the task.
- Once authentication is successful, save the connection.
Manual Token Refresh Method (For Clients Without a Custom App)
If you don't have a custom app, the tokens will not refresh automatically. In this case, the access token issued by LinkedIn has a lifespan of 60 days, and a manual refresh is required.
Steps for manual token refresh:
- Go to your Rivery LinkedIn connection.
- Remove the current connection by clicking Disconnect.
- Reconnect to your LinkedIn account following the same steps for a user-based connection (see "Connecting Using LinkedIn User" section).
This will generate a new token, valid for another 60 days. Make sure to repeat this process every 60 days to ensure uninterrupted access.
Connection Troubleshooting
If your access token expires, you may encounter the following error message:
Testing connection to LinkedIn Failed: 'Failed to refresh access token. Status: 400, Error: The provided authorization grant or refresh token is invalid, expired or revoked'.
In such cases, follow the manual refresh steps to regenerate a valid token.