Once your users have connected their Facebook Ads account, you can use the Paragon SDK to access Facebook Ads on behalf of connected users.See the Facebook Ads REST API documentation for their full API reference.Any Facebook Ads API endpoints can be accessed with the Paragon SDK as shown in this example.
JavaScript
Copy
Ask AI
// You can find your project ID in the Overview tab of any Integration.// Authenticate the userparagon.authenticate(<ProjectID>, <Paragon User Token>);// Get Campaignsawait paragon.request(‘facebookAds’, 'act_<AD_ACCOUNT_ID>/campaigns', { method: 'GET'})// Create a Campaignawait paragon.request('facebookAds', 'act_<AD_ACCOUNT_ID>/campaigns' , { method: 'POST', body: { name: "My First Campaign", objective: "POST_ENGAGEMENT", status: "PAUSED", special_ad_categories: [] }})