Meta (Facebook + Instagram) Ads
API versie: Graph API v22.0 · Officiële docs: https://developers.facebook.com/docs/marketing-api
OAuth-flow
Standard OAuth 2.0 authorization code flow
| Authorization URL | https://www.facebook.com/v22.0/dialog/oauth |
| Token URL | https://graph.facebook.com/v22.0/oauth/access_token |
| Token body format | application/x-www-form-urlencoded |
| Scopes | ads_read, ads_management, read_insights, business_management |
| API base URL | https://graph.facebook.com/v22.0 |
| Auth header | access_token query param OR Authorization: Bearer |
Wat wordt gesynchroniseerd
- Ad accounts (act_*)
- Campaigns
- Ad sets
- Ads
- Daily insights (impressions, reach, clicks, spend, conversions, video views P25-P100)
Sync interval: Elke uur via BullMQ worker
Rate limits
Meta business-level + app-level — wij respecteren `X-Business-Use-Case-Usage` headers en backoff bij 80%+
Bekende beperkingen
- Lead ads (Lead Forms) vereisen extra "leads_retrieval" permissie — niet default geactiveerd
- Conversion API events kunnen we ontvangen via webhook, niet zelf sturen (zie /docs/api/webhooks)
- Aanmaken / wijzigen van campagnes vanuit Pitchfire is read-only in MVP (komt in v1.1)
Verbinden
- Ga in je workspace naar
/connections - Klik op "Verbinden" bij Meta (Facebook + Instagram) Ads
- Log in bij Meta (Facebook + Instagram) Ads en geef toestemming voor de scopes
- Selecteer welk ad-account je wilt synchroniseren
- De eerste sync start automatisch; volgende syncs draaien elke uur