Registry / communication / tiktok-business-api-sdk-official

tiktok-business-api-sdk-official

JSON →
library1.1.3pypypi✓ verified 81d ago

Official TikTok Business API SDK for Python, version 1.1.3. Provides classes and methods to interact with TikTok's advertising platform (Business API). Released as needed; currently stable.

pip install tiktok-business-api-sdk-official
INSTALL
IMPORT
SIG · TIKTOK-BUSINESS-AP
T
tiktok-business-api-sdk-official
communicationpythonv1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

APPManagementApi
from business_api_client import APPManagementApi
from tiktok_business_api_sdk import TikTokBusinessApiClient
AccountManagementApi
from business_api_client import AccountManagementApi
from tiktok_business_api_sdk import TikTokBusinessApiClient
AdAcoApi
from business_api_client import AdAcoApi
from tiktok_business_api_sdk import TikTokBusinessApiClient

Initialize client and make a GET request.

from tiktok_business_api_sdk import TikTokBusinessApiClient client = TikTokBusinessApiClient( app_id=os.environ.get('TIKTOK_APP_ID', ''), secret=os.environ.get('TIKTOK_SECRET', ''), access_token=os.environ.get('TIKTOK_ACCESS_TOKEN', '') ) # Example: list campaigns (adjust endpoint as needed) campaigns = client.get('/open_api/v1.2/campaign/get/', params={'advertiser_id': 'YOUR_ADVERTISER_ID'}) print(campaigns)
Debug
Known issues
breakingSDK v1.1.x changed the import path from 'tiktok_business_sdk' to 'tiktok_business_api_sdk'. Old imports will raise ModuleNotFoundError.
fix
Update imports to use 'tiktok_business_api_sdk' instead of 'tiktok_business_sdk'.
affects: >=1.1.0
gotchaAccess token is required; the SDK does not handle token refresh automatically.
fix
Implement token refresh logic externally or regenerate tokens via OAuth before expiry.
affects: all
gotchaBase URL is hardcoded to 'https://business-api.tiktok.com'. For sandbox, you must override it.
fix
Pass 'base_url' parameter to client constructor: TikTokBusinessApiClient(..., base_url='https://sandbox-ads.tiktok.com')
affects: all
deprecatedThe 'get_advertiser' method in v1.0 has been deprecated; use generic 'get' or 'post' instead.
fix
Replace client.get_advertiser(advertiser_id) with client.get('/open_api/v1.2/advertiser/info/', params={'advertiser_id': advertiser_id})
affects: >=1.1.0
Upgrade
Version history
1.1.3latest on PyPI · released Feb 27, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
59 hits · last 30 days
node
52
OpenAI (training)
1
Resources
tiktok-business-api-sdk-official — pip install tiktok-business-api-sdk-official · libregistry