Connect ads
Changed onConnect ads for a platform (separate from posting). Required before campaigns/ads sync. Same-token platforms (facebook, instagram, linkedin, pinterest) need no extra OAuth; tiktok, twitter, googleads, microsoftads and redditads return an auth_url. ChatGPT ads (openaiads) have no OAuth: send an api_key from ChatGPT Ads Manager, which covers exactly one ad account.
Request
- Base URLhttps://api.crevio.co/v1
- AuthAPI key in header Authorization
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
Request body
microsoftads only. Send google when the user signs in to Microsoft Advertising with a Google account, so consent runs on Google.
Parent posting channel (sacct_…), for same-token platforms.
openaiads only, and required there. API key from ChatGPT Ads Manager (Settings). OpenAI has no read-only scope, so the key carries full campaign write access. Posting a rotated key for the same ad account updates the connection in place. A key OpenAI rejects returns 422.
Scope sync to one Meta ad account (act_…).
Re-run OAuth even though a connection already exists. Without it a same-token connection (facebook/instagram/linkedin/pinterest) keeps answering already_connected on its posting token, so a channel whose token lacks ads scopes can never be repaired.
Response
Connection result (already_connected, account, or auth_url).
Changes
- info
added the new optional request property
identity_provider - info
added the new
microsoftadsenum value to the request propertyplatform - info
added the new
redditadsenum value to the request propertyplatform
- info