Skip to main content

LinkedIn Ads

This connector captures data from LinkedIn Ads into Flow collections through the LinkedIn Marketing API.

ghcr.io/estuary/source-linkedin-ads:dev provides the latest connector image. You can also follow the link in your browser to see past image versions.

Supported data resources

The following data resources are supported:

By default, each resource is mapped to a Flow collection through a separate binding.

Prerequisites

There are two ways to authenticate with LinkedIn when capturing data into Flow: using OAuth2, and manually, by creating a developer application. Their prerequisites differ.

OAuth is recommended for simplicity in the Flow web app; the developer application method is the only supported method using the command line.

Using OAuth2 to authenticate with LinkedIn in the Flow web app

Configuring the connector specification manually

To configure without using OAuth, you'll need to create an application using the LinkedIn Marketing API, and generate its access token.

Setup

  1. Create a marketing application on LinkedIn Developers.
  2. Apply to the LinkedIn Developer Program.
  3. Generate your access token.
caution

LinkedIn access tokens expire in 60 days. You must manually update your capture configuration to continue to capture data from LinkedIn.

Configuration

You configure connectors either in the Flow web app, or by directly editing the capture specification. See connectors to learn more about using connectors. The values and specification sample below provide configuration details specific to the LinkedIn Ads source connector.

Properties

Endpoint

The properties in the table below reflect the manual authentication method. If you're working in the Flow web app, you'll use OAuth2, so some of these properties aren't required.

PropertyTitleDescriptionTypeRequired/Default
/account_idsAccount IDs (Optional)A space-separated list of the account IDs from which to capture data. Leave empty if you want to capture data from all linked accounts.array[]
/credentialsAuthenticationobject
/credentials/auth_methodAuthentication methodSet to access_token to authenticate manually.string
/credentials/access_tokenAccess tokenAccess token generated from your LinkedIn Developers app.string
/start_dateStart dateUTC date in the format 2020-09-17. Any data before this date will not be replicated.stringRequired

Bindings

PropertyTitleDescriptionTypeRequired/Default
/streamStreamLinkedIn Ads stream from which a collection is captured.stringRequired
/syncModeSync ModeConnection method.stringRequired

Sample

This sample specification reflects the manual authentication method.

captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-linkedin-ads:dev
config:
account_ids:
- 000000000
- 111111111
credentials:
auth_method: access_token
access_token: {secret}
start_date: 2022-01-01
bindings:
- resource:
stream: campaigns
syncMode: incremental
target: ${PREFIX}/campaign
{...}