> For the complete documentation index, see [llms.txt](https://omegatheme-contact.gitbook.io/omega-multiple-tiktok-pixels-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://omegatheme-contact.gitbook.io/omega-multiple-tiktok-pixels-1/set-up-events-api.md).

# Set up Events API

{% hint style="info" %}
This step is required when you add pixel manually. With auto add pixel or create pixel directly within our app, this setup is not necessary. We will auto get the Access token for you.

[**-> See AUTO ADD NEW PIXEL in app**](/omega-multiple-tiktok-pixels-1/add-your-tiktok-pixel/auto-add-existing-tiktok-pixel.md)

[**-> See CREATE NEW PIXEL in app**](/omega-multiple-tiktok-pixels-1/add-your-tiktok-pixel/create-new-pixel-directly-in-omega.md)
{% endhint %}

## Check out this video for detailed instructions:

{% embed url="<https://www.youtube.com/watch?index=5&list=PL74Buw3DNN_amKOGKmPhlzAnxSlRahlne&v=h5HKID6dMzs>" %}

### 1️⃣ Get an access token from TikTok Events Manager

The access token is a key that allows our app to send server events to the TikTok server through Events API. Server events will be stored in your pixel ID and processed the same way as browser events by Tiktok

👉 Go to Settings tab of your pixel

<figure><img src="/files/J7wtZPoQiFpvvEznsXqc" alt=""><figcaption></figcaption></figure>

👉 Scroll down to the bottom. Click **Generate Access Token**, copy the value&#x20;

<figure><img src="/files/J2r2ZO5QNGvTPfZdUarq" alt=""><figcaption></figcaption></figure>

### 2️⃣ Pass the access token to Omega

<figure><img src="/files/FOqXvkWnLeeRJ2j5UEyi" alt=""><figcaption></figcaption></figure>

That’s it! Your next task is testing if server events are sent properly.

### Check if your Events API is working well

{% hint style="info" %}
You can either use the Omega Test Tool or the TikTok Event Test Code
{% endhint %}

### Omega Events Test Tool (recommended)

💡 First, copy this line ?otEnableTrackTool=1 and follow the steps

***View content***

<figure><img src="/files/ir3XD1Q6qoqopDAMI3hz" alt=""><figcaption></figcaption></figure>

***Add to cart***

<figure><img src="/files/hEzQKTxjHyMM8kgTBMVy" alt=""><figcaption></figcaption></figure>

***Initiate Checkout***

<figure><img src="/files/XT4zgAXmDYL75lLvNyeN" alt=""><figcaption></figcaption></figure>

***Complete Checkout***

<figure><img src="/files/u3RkP8w1OX30Jk12mLn0" alt=""><figcaption></figcaption></figure>

You can also double check in your Event Manager

<figure><img src="/files/NrQuMyPQc6pa8AWEjhcU" alt=""><figcaption></figcaption></figure>

### TikTok Event Test Code

#### Go to your TikTok Pixel -> Test Events -> Copy the test code

<figure><img src="/files/kMuSMOUmbvzixxZeZhXH" alt=""><figcaption></figcaption></figure>

#### Paste the code to Omega

<figure><img src="/files/pPqrJkU8NZsJORHh4od5" alt=""><figcaption></figcaption></figure>

That's it. You can perform some test actions & go back to the TikTok Test Events tab to see the test events result.

{% hint style="warning" %}
**Important:** You have to remove the test code after testing for the live events to arrive properly
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://omegatheme-contact.gitbook.io/omega-multiple-tiktok-pixels-1/set-up-events-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
