Skip to main content

Connect a TikTok ad account

You connect each TikTok ad account once. TikTok asks the account owner to approve Upload-Post, and from then on every TikTok Ads call can use it.

This connection is separate from the TikTok account you publish with: it gives access to the ad account (Ads Manager), not to posting.

  • Authentication: API key, Authorization: Apikey your-api-key-here
  • Base URL: https://api.upload-post.com/api/uploadposts/ads/tiktok
POST /api/uploadposts/ads/tiktok/connect
NameTypeRequiredDescription
profile_usernameStringNoLink the ad account to this profile when it connects.
redirect_urlStringNoWhere the Upload-Post dashboard sends the user back after connecting (http/https). It gets ?connect_status=success.
curl -X POST https://api.upload-post.com/api/uploadposts/ads/tiktok/connect \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{"profile_username": "my-profile", "redirect_url": "https://example.com/ads/done"}'
{
"success": true,
"authorize_url": "https://business-api.tiktok.com/portal/auth?app_id=...&state=...&redirect_uri=...",
"expires_in": 3600
}

Open authorize_url in a browser within the hour. The owner of the ad account signs in to TikTok for Business and approves; TikTok may email a verification code to the ad account's address. TikTok then sends the browser to the Upload-Post dashboard, which finishes the connection.

  • If the authorization reaches one ad account, it is connected right away.
  • If it reaches several, the dashboard lists them so you pick the ones to connect.

2. List the connected accounts​

GET /api/uploadposts/ads/tiktok/accounts

Reads Upload-Post only (no TikTok call). No token or secret is ever returned.

curl https://api.upload-post.com/api/uploadposts/ads/tiktok/accounts \
-H 'Authorization: Apikey your-api-key-here'
{
"success": true,
"count": 1,
"accounts": [
{
"advertiser_id": "7300000000000000001",
"name": "Acme Ads",
"currency": "EUR",
"timezone": "Europe/Madrid",
"status": "STATUS_ENABLE",
"default": true,
"reauth_required": false,
"connected_at": "2026-11-27T10:12:00+00:00",
"updated_at": "2026-11-27T10:12:00+00:00",
"profiles": ["my-profile"]
}
]
}

reauth_required: true means TikTok no longer accepts the authorization (it was revoked in TikTok): connect the account again.

Live details of an account​

GET /api/uploadposts/ads/tiktok/account

Reads the account from TikTok now: name, currency, time zone, status, balance and country. Pick the account as explained in Choosing the ad account.

curl https://api.upload-post.com/api/uploadposts/ads/tiktok/account \
-H 'Authorization: Apikey your-api-key-here' \
-H 'X-Ads-Account-Id: 7300000000000000001'
{
"success": true,
"account": {
"advertiser_id": "7300000000000000001",
"name": "Acme Ads",
"currency": "EUR",
"timezone": "Europe/Madrid",
"status": "STATUS_ENABLE",
"balance": 250.0,
"country": "ES",
"default": true
}
}

Connect another account of the same authorization​

When an authorization reaches several ad accounts, the dashboard uses these two calls. You can use them too, with the grant_id of that authorization.

GET  /api/uploadposts/ads/tiktok/grants/{grant_id}/advertisers
POST /api/uploadposts/ads/tiktok/accounts

The first lists every ad account the authorization reaches, with connected: true|false. The second connects one of them:

NameTypeRequiredDescription
grant_idStringYesThe authorization.
advertiser_idStringYesOne of the ad accounts it reaches (checked live with TikTok).
profile_usernameStringNoLink it to this profile.
defaultBooleanNoMake it the default account. The first account you connect is the default.
curl -X POST https://api.upload-post.com/api/uploadposts/ads/tiktok/accounts \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{"grant_id": "g_9xK2mQ4pT7vR", "advertiser_id": "7300000000000000002", "profile_username": "my-profile"}'
{
"success": true,
"message": "TikTok ad account connected",
"account": { "advertiser_id": "7300000000000000002", "name": "Acme Ads EU", "default": false, "profiles": ["my-profile"] }
}

Profiles and ad accounts​

An agency links each client's ad account to that client's profile. Pass profile_username when connecting; after that, send profile_username on any call to work on that account only. Upload-Post never falls back to your default account for a profile: spending on the wrong client's account is worse than an error.

Disconnect​

DELETE /api/uploadposts/ads/tiktok/accounts/{advertiser_id}
  • Without profile_username: Upload-Post forgets the account, unlinks every profile and revokes the TikTok authorization once no other connected account uses it.
  • With ?profile_username=my-profile: only unlinks that profile.

Campaigns keep running in TikTok Ads Manager either way. Pause them first if you want them to stop.

curl -X DELETE https://api.upload-post.com/api/uploadposts/ads/tiktok/accounts/7300000000000000001 \
-H 'Authorization: Apikey your-api-key-here'
{
"success": true,
"message": "TikTok ad account disconnected. Its campaigns keep running in TikTok Ads Manager."
}

Next: Boost a post.