Skip to main content

TikTok Ads destination connector package for RETL Custom Audience contracts.

Project description

TikTok Ads Destination Connector

This package exposes the first-party retl/tiktok-ads destination connector.

Surfaces

  • custom_audiences: State surface for TikTok Ads Custom Audience membership. Supports upsert and remove, requires a Target audience, and supports managed target creation.

RETL accepts email, phone_e164, and mobile_advertising_id identifiers. The connector hashes values with SHA-256 unless they are already SHA-256 hex. Email and phone values are trimmed and lowercased before hashing; mobile advertising IDs are trimmed and lowercased before hashing.

Auth

The connector uses TikTok's Access-Token header:

destination = retl.destinations.load(
    "retl/tiktok-ads",
    binding_name="tiktok_ads_primary",
    credential_namespace="destinations.tiktok_ads",
    config_namespace="destinations.tiktok_ads",
)

Environment-backed names:

DESTINATIONS__TIKTOK_ADS__ACCESS_TOKEN
DESTINATIONS__TIKTOK_ADS__ADVERTISER_ID
DESTINATIONS__TIKTOK_ADS__API_VERSION
DESTINATIONS__TIKTOK_ADS__MOBILE_ADVERTISING_ID_TYPE

Config

Required public config:

  • advertiser_id: TikTok Ads advertiser ID.

Optional public config:

  • api_version: defaults to TikTok Business API version 1.3, including the TikTok path prefix used by the Business API.
  • mobile_advertising_id_type: defaults to MAID_SHA256; may be IDFA_SHA256 or GAID_SHA256 when the source column is platform-specific.

The connector owns the production API origin https://business-api.tiktok.com in package code. Tests use injected transports to capture requests without changing that origin.

API Notes

This connector uses TikTok Business API version 1.3 DMP Custom Audience endpoints. Membership data is rendered as an in-memory text file, uploaded to TikTok, and then referenced by the create/update request:

  • POST /open_api/{api_version}/dmp/custom_audience/file/upload/
  • POST /open_api/{api_version}/dmp/custom_audience/create/
  • POST /open_api/{api_version}/dmp/custom_audience/update/

Managed target lookup uses:

  • GET /open_api/{api_version}/dmp/custom_audience/list/

TikTok audience processing can be asynchronous; submission evidence is therefore reported as accepted.

Proof

Default package tests are deterministic and offline. They use injected transports to verify request paths, headers, bodies, target mapping, dry-run behavior, response classification, and managed target lookup/create behavior.

The opt-in live sandbox test reads local/env/.env.tiktok_ads-sandbox when present and runs with:

make test-sandbox-tiktok-ads

It creates a disposable Custom Audience through file upload, submits one synthetic upsert and one synthetic remove, asserts TikTok acceptance evidence, and best-effort deletes the audience through the DMP Custom Audience delete endpoint.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

condor_retl_tiktok_ads-0.1.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

condor_retl_tiktok_ads-0.1.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file condor_retl_tiktok_ads-0.1.0.tar.gz.

File metadata

  • Download URL: condor_retl_tiktok_ads-0.1.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for condor_retl_tiktok_ads-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8c2ce9debd8667241d2dabb54fc04b17bd8c14c450dc9313a6bda56bf671c9a
MD5 4121e59c7d8fb7c2a0011ea9f9dab1d4
BLAKE2b-256 9e4390dffaa5ff5f63162375868214a2a57b9b59d5274d81a0102191082f4701

See more details on using hashes here.

Provenance

The following attestation bundles were made for condor_retl_tiktok_ads-0.1.0.tar.gz:

Publisher: publish.yml on condorgraph/condor-retl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file condor_retl_tiktok_ads-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for condor_retl_tiktok_ads-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 405e033ea1c3ea6fcabec68de164a69d40399a907158e80c14aa81759c28ebe5
MD5 2418b1dcc8991258dc7ac793579c74ac
BLAKE2b-256 82967117e5e0eae05cf58f7b45c5b2829a0454e0ae9727de37508cd63abe68e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for condor_retl_tiktok_ads-0.1.0-py3-none-any.whl:

Publisher: publish.yml on condorgraph/condor-retl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page