Guides · Setup

How to Connect the TikTok Ads API to AI Agents with Outloop

Last updated:

In short

Connecting TikTok Ads to Outloop means authorizing your advertiser accounts once in the browser, so AI agents can run approved Marketing API calls without ever holding the token.

You click Connect, approve your advertiser accounts on TikTok, and the access token lands in your Mac Keychain. Outloop then runs one read-only check — and only a real success turns agent access on. Each client workspace is pinned to its own advertiser IDs.

Summarize this setup guide with AI ChatGPTClaudePerplexity

What this connection enables

One TikTok Business Center authorization, stored once, reachable by as many client workspaces as you assign — with each workspace bounded to its own advertiser accounts. Agents in those workspaces can read campaigns, ad groups, ads, creatives, audiences and reporting through the TikTok Marketing API, and make approved writes, without the token ever being visible to them.

What you need before starting

You do not need your own TikTok developer app

This is the step most people expect and do not have to take. The browser connect flow never asks you for an App ID, an App Secret, an authorization code, or a refresh token — there is no field for any of them. You authorize your advertiser accounts, and Outloop receives a credential bound to the workspaces you selected.

When you do need your own approved app: only if you want to obtain an access token yourself and paste it through the Advanced fallback, or if you are building your own integration against the Marketing API. That route starts with getting a developer app approved — see how to get your TikTok API for Business app approved, which is a separate process with its own review timeline.

Step 1: Add TikTok Ads access

In the Outloop Mac app open API Keys & Access, then Add an API key, and choose TikTok Ads as the service. The panel changes to a connect-first flow. Note the banner: “Access is granted only after a read-only check passes.” That is the rule this whole connector is built around.

Outloop Add an API key panel with TikTok Ads selected, showing the agency-global scope, the workspace picker, the read-only check notice, the optional Business Center fields, and the Connect TikTok Marketing API button.
Two names, one connector. The service row is labelled TikTok Ads while the connect panel and its button say TikTok Marketing API. Both refer to the same connection — the first is the product name, the second is the API being authorized.

Step 2: Choose the scope and workspaces

For an agency Business Center that covers several clients, keep the recommended Agency-global / shared scope: the credential is stored once and assigned out. Shared is not the same as open — a workspace gets access only if you tick it here, and only to the advertisers you map to it later.

Tick the client workspaces that should get access. At least one is required; the connection is bound to the workspaces you select. The two Business Center fields below are optional and informational only — they help you recognise the credential later and are never an access grant.

You are not asked for an advertiser ID here, and that is deliberate. The panel says so itself: “No advertiser ID is needed here. After connecting, assign each client workspace its own advertiser ID(s) on the key row — runtime access stays blocked for a workspace until its account is assigned.” That assignment is Step 6.

Step 3: Connect TikTok in your browser

Click Connect TikTok Marketing API. Outloop opens TikTok in your system browser and the panel switches to “Waiting for you to approve…”. Leave the Outloop window open — it is waiting for the authorization to come back, and it resumes on its own when you return to the tab.

Outloop TikTok connect panel in the waiting state, telling the operator to approve the advertiser accounts in the browser tab that just opened and to leave the page open.

If the browser does not open by itself, Outloop shows the address to open manually rather than failing silently.

Step 4: Approve, then allow Keychain access

In the browser, sign in to TikTok if needed and approve the advertiser accounts you want this connection to cover. Approve only what the agent should be able to reach — this is the outer boundary, and the per-workspace advertiser mapping in Step 6 narrows it further.

On the first check macOS may show a dialog asking for your Mac login password. Enter it and click Always Allow so Outloop can read the stored credential without prompting again. This is a macOS Keychain permission prompt — it is not a request for the TikTok token, and no agent ever sees that dialog or the value behind it.

Step 5: The read-only check turns access on

As soon as the credential is stored, Outloop runs one read-only call against TikTok. Only a real success arms runtime access — and “success” means both an HTTP 2xx status and a TikTok body code of 0.

Outloop TikTok connect panel showing a green connected confirmation that the read-only check passed and runtime access is on, with the note that the credential is stored in the macOS Keychain and secret_exposed is false.

If the check does not pass, the credential is still stored but nothing can use it. This is the honest failure state, not an error to work around:

Outloop warning that the TikTok credential was stored but the read-only check did not pass, so runtime access stays off, with advice to check the approved advertiser access and re-run the check.

Fix the underlying access on the TikTok side, then press Re-run access check on the key row. Turning access back down is never gated — you can disable the connector at any time.

If a connection is cancelled or expires, nothing is kept. Outloop says so explicitly rather than leaving a half-finished credential behind. Start the connection again when you are ready.
Outloop TikTok connect panel showing that the connection did not complete because it expired, and that nothing was stored and no access was granted.

Step 6: Assign advertiser IDs per workspace

Expand the TikTok Ads key row and set each workspace its own TikTok advertiser ID(s) — digits only, comma-separated for more than one. This is what makes a shared agency credential safe to point at several clients.

Outloop key row cell for assigning TikTok advertiser IDs to a workspace, explaining that any other advertiser including others in the same Business Center is blocked before the credential is read.

The first safe proof

The proof is deliberately read-only. Before an advertiser is mapped, Outloop verifies the credential against the Business Center; once one is mapped, it verifies advertiser-scoped access:

GET /v1.3/bc/get/                                   # stage 1 — credential works
GET /v1.3/campaign/get/?advertiser_id=<ADVERTISER_ID>   # stage 2 — this workspace's advertiser

Success criteria — all of them, not just the HTTP status:

HTTP 200
code: 0
decision: allow
secret_exposed: false
audit entry exists
Read access: Live verified through Outloop Audited Secret-safe Workspace-scoped

Full API capabilities and write actions

Outloop bounds the connection to the TikTok Marketing API base https://business-api.tiktok.com/open_api, injects the credential host-side, and redacts the response. Paths are versioned in the URL as /v1.3/<endpoint>/ and most keep a trailing slash. Adding the connection also sets up that bounded bridge and an injected TIKTOK_ACCESS_TOKEN environment variable for CLI tools that need the value in their environment — in both cases the value is supplied host-side at run time and never shown to the agent.

On the authentication header. Several third-party write-ups describe TikTok Marketing API authentication as an Authorization: Bearer header. The connector injects Access-Token, and that is the form the verified proof used. You never set either one yourself — sending your own authentication header is not part of the request shape.
The safest first write to test is a status change you can reverse: pause a single, low-impact ad group and then resume it. Confirm the response carries a TikTok code of 0 before trusting the change. Never run a write as part of an access check.

Business Center admin and financial actions

Two categories are treated as elevated and are off by default, each with its own switch on the key row. Ordinary campaign, creative and audience work never needs either.

Outloop Business Center and elevated actions cell for a TikTok workspace, showing the Business Center ID field and the unchecked Allow financial actions and Allow Business Center administration switches.
Two fields, same name, opposite meaning. The Business Center ID on the connect panel in Step 2 is a cosmetic label — it is marked “informational only, never an access grant” and grants nothing. The Business Center ID(s) on the key row, shown above, is a pin: Business-Center-scoped calls stay blocked for a workspace until you map its own ID(s) here, exactly like the advertiser pin. Ordinary campaign, creative and audience work never needs it.

What is verified vs not claimed

Marketing API through Outloop vs TikTok Ads MCP

For this workspace, the TikTok Marketing API through Outloop is the TikTok path that is live and verified right now.
Dimension Marketing API through OutloopTikTok Ads MCP (official)
Status here Runtime verified Two-stage read proof passed: decision allow, HTTP 200, TikTok code 0, secret_exposed false, audited. Announced, not generally available Announced at TikTok World ’26 on 13 May 2026. As of the latest reporting there is no public self-serve install guide, no published tool spec, and no confirmed GA date.
Credential handling Never seen by the agent Stored in the macOS Keychain, read host-side per request, redacted out of every response. Depends on how the server is hosted and configured; not established in this workspace.
Per-client scoping Enforced per workspace Advertiser IDs are pinned per workspace; any other advertiser is refused before the credential is read. No workspace concept documented publicly; scoping would follow whatever account the server is pointed at.
Destructive actions Off by default Deletes and archives are detected from method, path and body, and stay behind an explicit switch. Reported to allow write operations; the boundary is not publicly specified.
Audit trail Every call audited One redacted record per attempt, including denials, with the decision and the reason code. Not established here.
Important: this comparison is intentionally conservative. The official TikTok Ads MCP may end up exposing a broad toolset, but it is not connected in this workspace — and by the latest public reporting it is not yet generally available — so this guide does not mark any MCP capability as verified. The Outloop API bridge path is what is live and verified here. Third-party TikTok MCP servers exist but are not official.

Advanced: pasting your own token

There is a manual route, kept deliberately behind a collapsed disclosure labelled Advanced — paste a token instead, because it is not the path most people need. It exists for operators who already hold an access token obtained another way. Expand it and the input reads “Advanced — paste an existing access token”.

Outloop Advanced disclosure for pasting an existing TikTok access token, warning that it must be the exchanged access token and not the App Secret, App ID, auth code, refresh token, or the whole JSON response.

Paste the exchanged access_token only — not the App Secret, App ID, authorization code, refresh token, or the complete JSON response. Everything after that is identical: the value goes straight into the Keychain, the same read-only check runs, and access turns on only if it passes.

Troubleshooting

Rotate or revoke safely

Turning access down is never gated — only turning it on is. Work from the narrowest change to the broadest:

After any change on the TikTok side, press Re-run access check on the key row rather than assuming the new state — the check is the only thing that arms or disarms runtime access.

Official documentation

Verify anything platform-specific against TikTok's own current documentation rather than a third-party write-up — the authentication header in particular is described inconsistently elsewhere on the web.

The Outloop value

One authorization can reach many advertisers. Outloop makes that reach client-safe:

One Business Center credential may reach many advertiser accounts.
But each agent workspace only reaches the advertisers assigned to it.

Related: TikTok API for Business app approval · Meta Ads API setup · Google Ads API setup · AI agent API key management · Outloop for AI agencies.

Outloop is available with guided onboarding for agency teams. Outloop is an independent tool and is not affiliated with or endorsed by TikTok. See the security model.

Summarize this setup guide with AI ChatGPTClaudePerplexity

Run TikTok Ads agents without handing over tokens.

Outloop is available with guided onboarding for AI agencies, operators, and dev shops.

Frequently Asked Questions

TikTok Ads API + Outloop — FAQ