# BYO Mode Setup (/docs/paid-media/byo-setup)



BYO (Bring Your Own) mode plugs Layers into your existing ad account.
You pay the platforms directly; Layers takes no percentage of media
spend.

## Step 1: OAuth your ad account [#step-1-oauth-your-ad-account]

In the ad layer's setup wizard:

1. Pick **BYO mode**.
2. Click **Connect via OAuth**.
3. Sign in to Meta / TikTok / Google with the account that owns the ad
   account.
4. Confirm scopes (varies by platform; minimums are below).
5. Pick the ad account if you have multiple.

## Step 2: Configure CAPI / Events API [#step-2-configure-capi--events-api]

For Meta and TikTok, you'll need to provide:

* **Pixel ID** / **Events Set ID** — the asset receiving events.
* **CAPI access token** — store in the
  [Layers credential vault](/docs/trust/vault). Layers gives you the
  vault entry to copy into.
* **Test event code** (Meta only) — for the first 30 days while you
  validate.

The setup wizard handles vault creation; you paste the token once.

## Step 3: Verify [#step-3-verify]

A verification step confirms:

* Layers can read campaigns / adsets / ads.
* Layers can publish a test event via CAPI.
* The test event appears in Meta Events Manager / TikTok Events Debugger.

## Per-platform specifics [#per-platform-specifics]

* [Meta BYO setup](/docs/paid-media/meta-setup#byo)
* [TikTok BYO setup](/docs/paid-media/tiktok-setup#byo)
* [Apple Search Ads](/docs/paid-media/apple-setup) — OAuth-based (`searchads` scope).

## OAuth scopes [#oauth-scopes]

| Platform | Scope                                                                                                                                                                           | Why                                                                                                                       |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Meta     | `ads_management`, `ads_read`, `business_management`, `pages_read_engagement`, `pages_show_list`                                                                                 | Manage campaigns + Pixel + Business Center + page selection (pages scopes are required dependencies of `ads_management`). |
| TikTok   | Portal-level auth via `business-api.tiktok.com/portal/auth` (TikTok does not itemize scopes in the OAuth URL; permissions are configured on the app in TikTok Business Center). | Manage campaigns + Pixel.                                                                                                 |
| Apple    | `searchads`                                                                                                                                                                     | Manage ASA campaigns, ad groups, keywords.                                                                                |

## Token expiry [#token-expiry]

OAuth tokens expire on a platform-specific schedule. Layers auto-refreshes
where the platform supports it. When refresh fails, you'll be prompted to
reconnect; until you do, the layer is paused (no new launches; existing
ads keep running until the platform's own cache invalidates).

## Switching to agency [#switching-to-agency]

If you want to switch from BYO to agency mode later, start fresh:

1. Drain spend from BYO campaigns.
2. Pause the BYO layer.
3. Install a new Meta Ads layer in agency mode.
4. Eventually delete the BYO layer.

Layers does NOT migrate campaigns from BYO to agency or vice versa.
