Module: Pinterest
- Defined in:
- app/services/pinterest/api_client.rb,
app/services/pinterest/oauth_service.rb,
app/services/pinterest/advertiser_api_client.rb
Overview
Faraday-backed client for the Pinterest v5 Marketing / Advertiser API —
the campaign / ad-group / ads / insights surface, NOT the Conversions
API (ApiClient). Same api.pinterest.com/v5 host, different
auth context: this requires an OAuth 2.0 access token with ads:read
scope, separate from the conversion token used by the events endpoint.
Used by PinterestCampaignSyncWorker to fetch the ad-account's
campaigns once a day and mirror them into the sources table —
the direct parallel to OpenaiAds::AdvertiserApiClient driving
OpenaiAdsCampaignSyncWorker.
Pinterest scopes campaigns by ad_account_id in the URL path
(unlike OpenAI where the account is implicit in the bearer token).
Defined Under Namespace
Classes: AdvertiserApiClient, ApiClient, ConversionReporter, OauthService