Cherry Seed

How do I get TikTok Events API credentials?

TikTok Events API access token pixel code API credentials TikTok Ads Manager authentication

Quick Answer

In TikTok Ads Manager, navigate to Tools then Events then Web Events and select your existing Pixel. In the settings panel, find the Events API section and click Generate Access Token. This produces a long-lived token authenticating server-side API calls. You also need your Pixel Code, visible in the overview tab — the numeric identifier telling TikTok which property receives events. Both values are required for every API request: the Pixel Code identifies the destination and the access token authorizes the call. Store both as environment variables on your server, never in client-side code.

Full Answer

The credential setup takes approximately five minutes but requires the correct account permissions. You must be an Admin or Operator on the TikTok Ads account to generate Events API access tokens. Analyst-level access can view pixels but cannot create or manage API credentials.

The access token is a long-lived credential that does not expire automatically. TikTok does not enforce rotation, but security best practice is rotating annually or immediately after any team member with access leaves the organization. If compromised, an attacker could send fraudulent conversion events to your TikTok pixel, corrupting your ad optimization data.

The Pixel Code is a numeric identifier assigned when you create a Web Pixel in TikTok Ads Manager. Each ad account can have multiple pixels, and each pixel has its own code. When implementing Events API, ensure the pixel code matches the same pixel your browser-side TikTok Pixel uses — otherwise deduplication between browser and server events will not function.

For WooCommerce implementations, store both credentials as WordPress options or environment variables accessible to your server-side code. Never expose the access token in JavaScript, HTML source, or any code that reaches the browser. The token authenticates server-to-server communication and should exist only in your server environment. WordPress plugins that support TikTok Events API provide admin fields for entering these credentials and store them in the WordPress options table with appropriate access controls.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/713

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/tiktok-tracking/tiktok-events-api-tiktok-api-credentials