CONNECT APP
Build with TikTok Ads Manager
Marketing
- OAuth
MCP
Give your agent TikTok Ads Manager tools
Every TikTok Ads Manager action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's TikTok Ads Manager account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "tiktok_ads_manager",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Create Audience:
const result = await mcp.callTool({
name: "tiktok_ads_manager-create-audience",
arguments: {
advertiserId: "Advertiser ID",
audienceName: "Audience Name",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "tiktok_ads_manager",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Create Audience:
result = await session.call_tool("tiktok_ads_manager-create-audience", {
"advertiserId": "Advertiser ID",
"audienceName": "Audience Name",
})API PROXY
Call the TikTok Ads Manager API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the TikTok Ads Manager API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://business-api.tiktok.com/open_api/v1.3/user/info/",
})
// Any allowed TikTok Ads Manager endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://business-api.tiktok.com/open_api/v1.3/user/info/
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9idXNpbmVzcy1hcGkudGlrdG9rLmNvbS9vcGVuX2FwaS92MS4zL3VzZXIvaW5mby8?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run TikTok Ads Manager actions from your backend
Connect a user's TikTok Ads Manager account once, then run Create Audience on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "tiktok_ads_manager-create-audience",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
tiktok_ads_manager: { authProvisionId: "apn_xxxxxxx" },
advertiserId: "Advertiser ID",
audienceName: "Audience Name",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="tiktok_ads_manager-create-audience",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"tiktok_ads_manager": {"authProvisionId": "apn_xxxxxxx"},
"advertiserId": "Advertiser ID",
"audienceName": "Audience Name",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "tiktok_ads_manager-create-audience",
"configured_props": {
"tiktok_ads_manager": { "authProvisionId": "apn_xxxxxxx" },
"advertiserId": "Advertiser ID",
"audienceName": "Audience Name"
}
}'TOOLS
TikTok Ads Manager actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Create Audience
actionCreate a new TikTok custom audience from hashed customer identifiers. Uploads the identifiers first, then creates the audience — both steps happen in one tool call. Provide eitheridentifiers(a list of SHA256-hashed values passed directly) orfile_path(a CSV file with one identifier per line).identifier_typecontrols the hash format:EMAIL_SHA256for hashed emails,PHONE_SHA256for hashed phone numbers,IDFA_SHA256orGAID_SHA256for device IDs. To add members to an existing audience, use Update Audience instead. See the documentationWritev0.0.2 -
Create Lookalike Audience
actionCreate a TikTok lookalike audience based on an existing custom audience. TikTok finds users who share characteristics with the source audience. Use List Audiences to find the source audience ID.audience_sizecontrols reach vs accuracy:NARROW= most similar (smallest),BALANCED= mixed,BROAD= largest reach. Location IDs:6252001= United States,6269131= United Kingdom. Newly created audiences require up to 48 hours to be analyzed before they become active. See the documentationWritev0.0.2 -
Create or Update Ad
actionCreate a new TikTok ad or update an existing one. Omitad_idto create; provide it to update. Creative assets must be uploaded first using Upload Creative — the API requires asset IDs, not file URLs.identity_typeandidentity_idare required in v1.3; useCUSTOMIZED_USERfor non-Spark Ads. For create, see documentation. For update, see documentation.Writev0.0.2 -
Create or Update Ad Group
actionCreate a new TikTok ad group or update an existing one. Omitadgroup_idto create; provide it to update. Ad groups control placement, targeting, budget, schedule, bidding, and optimization within a campaign.billing_eventmust correspond to the chosenoptimization_goal— e.g., CLICK → CPC, CONVERT/INSTALL → OCPM, REACH/SHOW → CPM, ENGAGED_VIEW → CPV. Use campaign IDs from Create or Update Campaign or List Campaigns. For create, see documentation. For update, see documentation.Writev0.0.2 -
Create or Update Campaign
actionCreate a new TikTok campaign or update an existing one. Omitcampaign_idto create; provide it to update.objective_type,budget_mode, andbudgetare required when creating but are not accepted by the update endpoint. Common objective types:REACH,TRAFFIC,VIDEO_VIEWS,LEAD_GENERATION,APP_PROMOTION,CONVERSIONS,PRODUCT_SALES. After creating a campaign, use Create or Update Ad Group to add targeting and budget. For create, see documentation. For update, see documentation.Writev0.0.2 -
Get Advertiser Info
actionIdentity tool — call this first when a user references 'my account' or 'my campaigns'. Returns account details (name, currency, timezone, status) for the given advertiser ID. Find your advertiser ID in the TikTok Ads Manager URL afteraadvid=. See the documentation.Read-onlyv0.0.2 -
Get Report
actionRun a synchronous report to retrieve performance metrics for campaigns, ad groups, or ads.report_typeis required.advertiser_idis required for BASIC, AUDIENCE, PLAYABLE_MATERIAL, CATALOG, and TT_SHOP reports; usebc_idfor BC reports.data_levelis required for BASIC, AUDIENCE, and CATALOG reports.start_dateandend_dateare required unlessquery_lifetimeis true.dimensionsmust include an entity ID dimension for the chosen level (campaign_id,adgroup_id, orad_id) plus a time dimension (stat_time_dayorstat_time_hour). Common metrics:impressions,clicks,spend,cpc,cpm,ctr,reach,conversion,cost_per_conversion. See the documentationRead-onlyv0.0.2 -
Get Spark Ad Video Info
actionGet information about one or more TikTok posts published via a linked identity, for use as Spark Ad creatives. Returns video duration, dimensions, cover image, authorization status, and visibility. Requires an identity (identity_type+identity_id) — use/identity/get/to find identities linked to your ad account. Pass eitheritem_id(single post) oritem_ids(up to 20 posts). Pass the returneditem_idto Create or Update Ad astiktok_item_idto create a Spark Ad. See the documentationRead-onlyv0.0.2 -
List Ad Groups
actionList ad groups in a TikTok Ads account with optional filters. Returns ad group IDs, names, status, budget, schedule, and targeting. Use campaign IDs from List Campaigns to filter. Use ad group IDs returned here as input to List Ads or Create or Update Ad. See the documentationRead-onlyv0.0.2 -
List Ads
actionList ads in a TikTok Ads account with optional filters. Returns ad IDs, names, status, and creative details. Use campaign or ad group IDs from List Campaigns / List Ad Groups to narrow results. See the documentationRead-onlyv0.0.2 -
List Audiences
actionList custom audiences in a TikTok Ads account. Returns audience IDs, names, types, coverage, validity, and expiry. Returns both owned and shared audiences — useis_creatorin the response to check ownership. Use audience IDs returned here as input to Update Audience or Create Lookalike Audience. See the documentationRead-onlyv0.0.2 -
List Campaigns
actionList campaigns in a TikTok Ads account with optional filters. Returns campaign IDs, names, status, objective, and budget. Use campaign IDs returned here as input to List Ad Groups or Get Report. See the documentationRead-onlyv0.0.2 -
Send Conversion Event
actionSend a server-side web conversion event to TikTok via the Events API. Use this to report purchases, sign-ups, and other conversions without relying on browser-side tracking.pixel_idis the TikTok Pixel ID found in Events Manager — not the same asadvertiser_id. Standard event names:Purchase,CompleteRegistration,ViewContent,AddToCart,InitiateCheckout,Subscribe,Contact,Download. User identifiers (email,phone_number,external_id) must be SHA256-hashed before passing.timestampuses ISO 8601 format (e.g.,2024-01-15T19:49:27Z). Defaults to current time if omitted. See the documentationWritev0.0.2 -
Update Audience
actionUpdate a TikTok custom audience — rename it, or add/remove/replace members via a file of hashed identifiers. To rename only, provideaudience_nameand omitidentifiers/file_path. To modify members, provideidentifiersorfile_pathand setaction(APPEND,REMOVE, orREPLACE). The file upload and audience update happen in one tool call. Audience size must remain ≥ 1,000 after the operation. Use List Audiences to find theaudience_id. See the documentationWritev0.0.2 -
Upload Creative
actionUpload an image or video to the TikTok Ads Asset Library and return its asset ID. Always run this tool before Create or Update Ad when using new creative — the ad creation API requires asset IDs, not file URLs. Provide a publicly accessible URL or a/tmpfile path. Returnsimage_idfor images andvideo_idfor videos. Supported image formats: JPG, JPEG, PNG. Supported video formats: MP4, MOV, MPEG, AVI. For images, see See the documentation. For videos, see See the documentation.Writev0.0.2
EVENTS
TikTok Ads Manager triggers
Event sources your backend can deploy for users and receive through a webhook.
No TikTok Ads Manager triggers are available yet.
REFERENCE
App details
Reference metadata for the TikTok Ads Manager connector in the Pipedream registry.
- App slug
- tiktok_ads_manager
- Authentication
- OAuth
- Categories
- Marketing
- Actions
- 15
- Triggers
- 0
- API proxy
- Available