Register a developer app in the TikTok Marketing API portal (business-api.tiktok.com) and obtain the app_id and secret
Redirect the user to the TikTok authorization URL with app_id, state, and redirect_uri parameters to initiate the OAuth 2.0 authorization code flow
Exchange the returned authorization code for an access_token and refresh_token by POSTing to the TikTok Ads API OAuth token endpoint at https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/
Call the /open_api/v1.3/bc/create/ endpoint to create a Business Center account if one does not exist, then call /open_api/v1.3/advertiser/create/ to create an ad account under the Business Center, providing company name, currency, and timezone
Store the advertiser_id from the ad account creation response; this ID is required as a query parameter (advertiser_id) on all subsequent API calls for campaign management and reporting
Refresh the access_token before expiry using the refresh_token via the token refresh endpoint, since TikTok access tokens have a default 24-hour TTL
Known gotchas
TikTok access tokens expire after 24 hours by default; automated pipelines must implement token refresh logic or they will begin receiving AUTH_EXPIRED errors within one day of initial setup
The advertiser_id differs from the Business Center ID; many API operations require the advertiser_id as a parameter and will return a permission error if the Business Center ID is passed instead
Newly created ad accounts require a funding source (credit card or prepay balance) to be added in the TikTok Ads Manager UI before campaigns can be activated; this step cannot be completed via the API alone
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp