Design note — LinkedIn Ads connector (linkedin_ads)

Target registry item: C6 (wave 3 — vendor partner/API access programs). Status: design note only — NOT built. The catalog row linkedin_ads exists with available: false, wave 3 and zero fields (services/service-marketing-connectors/connector_credentials.py, measured 2026-10-12); posting any payload is refused 409 provider_not_available. Nothing here is a capability claim. Connector Definition of Done (CDoD) points 1–14 are tracked in docs/reports/ONBOARDING_CONNECTORS_STATE.md.

Auth

Read-only, merchant-owned (D2/D11): the ad account stays in the customer's LinkedIn Campaign Manager; MIZ OKI reads it under a grant the customer can revoke.

  1. Platform developer app + OAuth 2.0 (preferred). LinkedIn's Advertising API is reached through a developer application that must first apply for API access under the app's Products tab (vendor quick start, fetched 2026-10-12). Development tier is limited to ad accounts mapped to the app in the Developer Portal; Standard tier needs a tier-upgrade request to LinkedIn. The platform app is a Track O operator value; the customer authorizes it with a 3-legged OAuth flow (a "door", like OB-GAP-1's), and the vault keeps the resulting refresh token per (tenant, provider).
  2. Bring-your-own-app (fallback). A customer that already holds an approved LinkedIn app may supply its client id/secret and a refresh token on a typed card — the Google Ads shape, with the same small-business limitation OB-GAP-1 names.

No environment fallback; vault-only per (tenant, provider); a vault error is 503 fail-closed; a vault absence is merchant_credentials_not_configured before any provider call.

Fields (catalog row, when built)

key label secret required pattern help
ad_account_id Ad account ID no yes ^\d{9}$ The nine-digit Account ID shown in Campaign Manager (campaignmanager → the account's header / Accounts list). Not the Company Page id.
refresh_token OAuth refresh token yes yes — Issued by the OAuth door after the customer approves access; typed only on the bring-your-own-app path. Never echoed; masked hint only.
oauth_client_id OAuth client ID (own app) no no — Developer Portal → the app → Auth tab. Only for a customer-owned app.
oauth_client_secret OAuth client secret (own app) yes no — Same place. Only for a customer-owned app.

Door-issued tokens are written by the door, never typed. One vault entry per provider (OB-GAP-6).

Scopes

Read permissions only: the advertising read permissions LinkedIn grants to the app (ads read and ads reporting read — exact permission names are confirmed in the Developer Portal Auth tab at build time, CDoD point 1). Never the read/write advertising permission; never Lead Sync, Matched Audiences or Conversions API products (person-level — out of scope for this note).

Data topics

Ad analytics (impressions, clicks, spend, conversions, video metrics) by campaign × creative × day; account structure (campaign groups, campaigns, creatives). All aggregate. The API is monthly-versioned (LinkedIn-Version header; the fetched quick start warns that version 202510 sunsets 2026-10-15) — the adapter pins one version in provider_versions.py and the operator bumps it.

Aggregates only; no person-level field exists in the analytics endpoints the adapter calls. A TestD3ProcessingPosture-style test pins that no mapper output field is person-level. Lead and audience products stay out until a separate note with a consent-registry grant per data topic.

Mapper target

Paid-media pull adapter (services/service-marketing-connectors/direct_connectors.py family) → MAPPERS["linkedin_ads"] → ingest_gate → mizoki_unified_data, beside google_ads and meta_ads. No new store. Writebacks: none; MEASUREMENT_WRITEBACK=false untouched.

Failure modes → test-connection verdicts

Failure Verdict / fix
Ad account id not nine digits 422 invalid_field_format with the help text.
Token refresh refused (expired / revoked) token_invalid → "Re-authorize LinkedIn from the card." LinkedIn token lifetimes are finite; the door re-runs.
Authorized member has no role on the ad account permission_denied → "Ask an Account Manager / Billing Admin to add you to ad account <id> in Campaign Manager."
App in Development tier and the ad account is not mapped to it app_tier_insufficient — operator item (map the account, or complete the Standard-tier upgrade).
Pinned API version sunset operator item: bump provider_versions.py.
Vault read error 503 fail-closed.

Flag

LINKEDIN_ADS_SYNC default OFF (source literal, ast-asserted); the catalog row keeps available: false until CDoD point 14 (live verification against a real, customer-owned ad account, recorded with date and revision).

Owner / operator gates

Vendor references

← All docsView source on GitHub →