TikTok Ads Setup
Connect TikTok Ads Manager via BYO OAuth. Spark Ads, Events API, Pixel.
The TikTok Ads Manager layer (template ID
1a7f69d7-c013-4cb4-9d59-eb2d7fd5f52d) drives TikTok ad campaigns and
Spark Ads. You connect your own (BYO) TikTok ad account via OAuth.
Connect via OAuth
- Install the layer from the catalog.
- Click Connect via OAuth. You're redirected to
business-api.tiktok.com/portal/auth. - Sign in with the TikTok user that admins the ad account.
- Approve the Layers Marketing app (permissions are configured on the app itself in TikTok Business Center - the OAuth URL does not itemize scopes).
- Pick the ad account.
- Provide:
- Pixel ID - your TikTok Pixel ID.
- Events API access token - from TikTok Business Center → Events Manager → your Pixel → Settings → Generate access token.
- Layers stores the token in vault.
- Verify with a test event.
Layer config
{
"tiktokBusinessId": "...",
"adAccountId": "...",
"capi": {
"enabled": true,
"pixel_id": "...",
"access_token_vault_id": "vault_xyz"
},
"objectives": ["app_installs", "video_view"],
"monthlyCostCap": 30000
}Spark Ads
To run a creator's organic post as a Spark Ad:
- Creator opens their post → Settings → Permissions → Allow ads authorization → on.
- Creator copies the Spark code (6 chars).
- In Layers → UGC posts → that post → Add Spark code.
- The optimizer can now select this post into adsets.
See UGC licensing.
Event mapping
TikTok Events API requires standard event names. The relay map is:
| SDK event | TikTok event |
|---|---|
purchase_success, paywall_purchased | Purchase |
subscription_start, trial_start | Purchase |
add_to_cart | AddToCart |
content_open | ViewContent |
screen_view | PageView |
search | Search |
sign_up | CompleteRegistration |
Unmapped custom events are dropped at the relay (logged but not forwarded). Meta uses a similar but distinct map, and also drops unmapped events.
Verification
- Campaigns visible in Layers.
- Test event appears in TikTok Events Debugger.
- The ad account's billing method is funded.
Troubleshooting
- "Partnership pending" - TikTok takes 5–15 min to notify.
- "Custom event dropped" - your SDK is sending events not in TikTok's standard mapping; either rename in your SDK or accept the drop.
- Spark code expired - Spark codes have time limits set by the creator; ask for a fresh code.