Skip to content
FunnelGuard

Fix guide by FunnelsGuard

TikTok Events API token invalid: how to find and fix it

TRK-375Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

The TikTok Events API lets your server (or a tool acting for it) send conversions such as purchases and leads straight to TikTok, instead of relying only on the browser pixel. Each request is signed with an access token tied to your pixel or dataset. An access token is a long secret string that proves the request is allowed.

Why it costs you leads or sales

TikTok uses the conversions it receives to report results and to train its delivery. If server events are rejected, those conversions never arrive. Reporting shows fewer sales or leads than you really got, and the ad system has less signal to find similar buyers.

If you also run the browser pixel, some events still arrive, so the drop looks like a slow decline rather than a clear break. That makes it easy to blame creative or audience instead.

Where an invalid token breaks the chain
  1. Ad clickVisitor arrives from TikTok
  2. Purchase or leadConversion happens on your site
  3. Server sends eventRequest carries the access token
  4. TikTok accepts eventRejected as invalid token
  5. Reporting and optimisationConversion missing

The customer converts, but TikTok never receives the server event.

Conversions TikTok can seeExample numbers
Conversions TikTok can see (example)Real sales: 100 conversions per week; Token valid (pixel + API): 92 conversions per week; Token invalid (pixel only): 60 conversions per week038771009260Real salesToken valid (pixel + …Token invalid (pixel …conversions per week

Example: 100 real sales; with a bad token only the browser pixel reports, and some of those are blocked by browsers.

How to check if your site has it

Confirm the token is being rejected
  1. Open Events Manager

    In TikTok Ads Manager go to Tools, then Events, and open your pixel or dataset. Look at the Overview and Diagnostics tabs for warnings about the Events API connection.

  2. Compare browser and server counts

    Check each event's source. If browser events keep arriving but server events stopped on a certain date, the token is a prime suspect.

  3. Use Test Events

    In Events Manager open Test Events, copy the test event code, add it to a server request (or your integration's test field), and trigger a conversion. A token problem shows as an error instead of a received event.

  4. Read your server or app logs

    Look for an authentication error from the TikTok API response, usually an invalid or expired access token message. Your tag server, plugin or partner app often logs this.

How to fix it

Replace the token
  1. Generate a new access token

    In Events Manager open your pixel, go to Settings, find the Events API section and choose to generate an access token. Copy it immediately and store it in a password manager.

  2. Confirm the pixel ID

    Copy the pixel code from the same settings page so the token and ID match.

  3. Update every place that uses it

    Paste the new token wherever server events are sent from, as shown below. Remove stray spaces or line breaks.

  4. Send a test event

    Trigger a conversion with the test event code and check it appears in Test Events.

Where to paste the new token
  1. Open your server container

    If you use a server-side container with a TikTok Events API tag, open that tag and update the access token field, then check the pixel code.

  2. Preview and publish

    Use Preview mode to confirm the request succeeds, then publish the container.

Test a server event with curlbash
curl -s -X POST "https://business-api.tiktok.com/open_api/v1.3/event/track/" \
  -H "Access-Token: $TIKTOK_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"event_source":"web","event_source_id":"YOUR_PIXEL_CODE","test_event_code":"YOUR_TEST_CODE","data":[{"event":"Purchase","event_time":1700000000,"user":{},"properties":{"currency":"USD","value":10}}]}'
Server event rejected

The server sends the conversion but TikTok refuses it.

How to confirm it's fixed

Fix verification
  • Test Events shows a server event as received after a test conversion
  • The API response returns code 0, not an authentication error
  • Events Manager diagnostics no longer lists a token or connection warning
  • Server event counts resume in the Overview after a day
  • Browser and server events for the same action are deduplicated, not doubled

How to prevent it happening again

Prevention habits
  • Record who generated the token and where it is used
  • Generate tokens from a shared business account, not one person's login
  • Do not regenerate a token without updating every integration that uses it
  • Store tokens in a secrets manager, not in shared documents
  • Check Events Manager diagnostics weekly and after any account or team change
  • Log API response errors in your server and alert on repeated failures

How FunnelGuard handles this

FunnelGuard does not check for an invalid TikTok Events API token yet. It is a possible future check. The token is used between your server and TikTok, which a visitor-style test cannot see directly.

What FunnelGuard does cover nearby: it runs your real journeys on a schedule and checks the tracking hits the browser sends to platforms including TikTok, plus whether test leads reach your inbox and CRM. That helps you notice when browser-side conversions stop. It does not tell you the server token is the reason.

Questions people ask

Why is my TikTok Events API token invalid?

Usually the token was regenerated or revoked, copied with a missing character or space, or belongs to a different pixel. It can also stop working if the account that created it lost access. Generate a fresh token for the correct pixel and update every integration.

How do I generate a new TikTok Events API access token?

In TikTok Ads Manager open Tools, then Events, choose your pixel, go to Settings and find the Events API section. Generate the access token there and copy it straight away. Then paste it into your server, tag or plugin.

Why are my TikTok server events not showing in Events Manager?

Common reasons are an invalid access token, a wrong pixel ID, a malformed payload or a blocked server request. Check Diagnostics and Test Events, then read your server logs for the exact API error.

Does the TikTok Events API token expire?

Treat it as something that can stop working at any time. It can be replaced when someone generates a new one, or revoked if account access changes. Check your integration after any account change rather than assuming it lasts forever.

Will regenerating the token break my tracking?

Yes, if you do not update it everywhere it is used. The old token can stop working, so any tag server, plugin or app still using it will start failing. Update all of them straight after generating the new one.

How can I test the TikTok Events API without affecting live data?

Use the test event code from the Test Events tab in Events Manager. Add it to your request or to the test field in your integration. Events sent with that code show in the test view and are for checking your setup.

Do I still need the TikTok pixel if I use the Events API?

Many setups run both, because the combination can capture more conversions than either alone. If you do, send the same event_id from both so TikTok deduplicates them. Your integration's documentation will say which setup it supports.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.