> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom TikTok Ads App

> Connect TikTok Ads through your own TikTok for Business app (white-label) by pasting your app ID, app secret, and a long-term access token.

Markifact supports two ways to connect TikTok Ads: using the built-in **Markifact app** (Quick Connect) or connecting through your own **TikTok for Business app** (Custom App). With a custom app, every request Markifact makes to the Marketing API runs under your app, so your clients never see Markifact in their ad account's authorizations.

<Note>
  Custom app connections are available on the **Team** plan. See [White-label Connections](/core-concepts/white-label-connections) for the overview.
</Note>

***

## Quick Connect vs Custom App

| Feature                 | Quick Connect        | Custom App                              |
| :---------------------- | :------------------- | :-------------------------------------- |
| **Setup Time**          | 1 minute             | 20-30 minutes, plus TikTok's app review |
| **App the client sees** | Markifact            | Yours                                   |
| **API rate limits**     | Markifact's app      | Your app                                |
| **White Label**         | No                   | Yes                                     |
| **Plan**                | All plans            | Team                                    |
| **Best For**            | Quick setup, testing | Agencies, strict client requirements    |

***

## What You Need

Three values from your own TikTok for Business app:

| Value            | Where it comes from                                                                                                                 |
| :--------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
| **App ID**       | Your app's Basic Information page on TikTok for Business Developers                                                                 |
| **App Secret**   | The same page                                                                                                                       |
| **Access Token** | Obtained by authorizing your app with the TikTok for Business user who has access to the ad accounts, then exchanging the auth code |

TikTok's advertiser listing requires the app ID and secret of the app that issued the token, which is why Markifact asks for all three. Marketing API access tokens are long-term: they stay valid until the authorization is revoked.

<Note>
  **Already have your own authorization flow?** If your systems already hold a long-term access token issued by your app, skip to [Connect to Markifact](#connect-to-markifact).
</Note>

***

## Setting Up Your Custom TikTok Ads App

<Steps>
  <Step title="Create the App">
    1. Go to [TikTok for Business Developers](https://business-api.tiktok.com/portal/apps) and click **Create an app**
    2. Enter the app name, description, and your company details. This is the branding advertisers see when they authorize
    3. Under **Advertiser redirect URL**, enter a URL you control (for example `https://www.youragency.com/tiktok-callback`). TikTok appends the auth code to this URL after authorization; the page does not need to do anything
  </Step>

  <Step title="Select Scopes of Permission">
    Tick every permission Markifact nodes use. Missing scopes surface later as TikTok permission errors on the node.

    | Scope group                                               | Needed for                                                            |
    | :-------------------------------------------------------- | :-------------------------------------------------------------------- |
    | **Ad Account Management** (read and write)                | Account listing, settings                                             |
    | **Campaign, Ad Group and Ad Management** (read and write) | Creating and updating campaigns, ad groups, ads, budgets and statuses |
    | **Creative Management**                                   | Uploading images and videos, ad previews                              |
    | **Reporting**                                             | Performance reports                                                   |
    | **Audience Management**                                   | Audiences and targeting search                                        |
    | **Pixel and Catalog Management**                          | Pixels, catalogs, product sets                                        |
    | **Identity and Spark Ads**                                | Posting from TikTok accounts, Spark Ads                               |
  </Step>

  <Step title="Submit for Review">
    TikTok reviews new apps before they can call the Marketing API for real advertisers. Submit the app and wait for the **Approved** status. Agencies that already run their own integrations will have this in place.
  </Step>

  <Step title="Get the App ID and Secret">
    Open your app's **Basic Information** page and copy the **App ID** and **Secret**.
  </Step>

  <Step title="Authorize and Get the Auth Code">
    1. Open the following URL in a browser, replacing `YOUR_APP_ID` and the redirect URL with your values:

    ```bash theme={"dark"}
    https://business-api.tiktok.com/portal/auth?app_id=YOUR_APP_ID&redirect_uri=https%3A%2F%2Fwww.youragency.com%2Ftiktok-callback&state=markifact
    ```

    2. Sign in with the TikTok for Business user who has access to the ad accounts you want to manage and click **Confirm**
    3. TikTok redirects to your URL with `auth_code=...` in the query string. Copy the value. Auth codes expire after a few minutes and can be exchanged only once, so do the next step right away
  </Step>

  <Step title="Exchange the Auth Code for an Access Token">
    Run this request, replacing the three values:

    ```bash theme={"dark"}
    curl -X POST "https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/" \
      -H "Content-Type: application/json" \
      -d '{"app_id": "YOUR_APP_ID", "secret": "YOUR_APP_SECRET", "auth_code": "THE_AUTH_CODE"}'
    ```

    The response contains `data.access_token`. Copy it.

    > **Important:** Keep this token secure. Anyone holding it, together with your app ID and secret, can act on every ad account the authorizing user can reach.
  </Step>

  <Step title="Connect to Markifact">
    1. In Markifact, go to the [Connections](https://app.markifact.com/connections) page
    2. Click **Connect** on **TikTok Ads**
    3. Select the **Custom App (White-label)** tab
    4. Enter a **Connection Name** (for example "Acme Agency TikTok Ads")
    5. Paste your **App ID**, **App Secret**, and **Access Token**
    6. Click **Verify & Connect**

    Markifact makes one call to TikTok's advertiser listing with the three values. Nothing is saved unless it succeeds and returns at least one advertiser account.
  </Step>
</Steps>

***

## Selecting Your Connection

Custom app connections appear under the name you chose, with a **Custom app** badge on the Connections page. Select them in TikTok Ads nodes, agents, and MCP exactly like any other TikTok Ads connection.

***

## Rotating or Replacing the Token

Add the connection again with the **same connection name** and the new values. Markifact replaces the stored credentials in place, so workflows and agents bound to the connection keep working.

***

## Troubleshooting

<Accordion title="TikTok rejected the access token">
  The token was revoked, or it was issued by a different app than the one whose ID and secret you pasted. Tokens and app pairs must come from the same app. Re-run the authorization with your app and paste the new token.
</Accordion>

<Accordion title="TikTok rejected the app ID or app secret">
  Check both values on your app's **Basic Information** page. Resetting the secret in TikTok invalidates the old one.
</Accordion>

<Accordion title="The credentials are valid, but the token cannot see any advertiser accounts">
  The TikTok for Business user who authorized the app has no access to any ad account. Grant that user access in the Business Center or ad account settings, then authorize again and paste the new token.
</Accordion>

<Accordion title="A node fails with a permission error after connecting">
  The app is missing a scope, or it has not been approved by TikTok yet. Check the scopes and the review status in TikTok for Business Developers, then authorize again and paste the new token.
</Accordion>

***

## Summary

| Item             | Where to Find                                                 | What It Looks Like    |
| ---------------- | ------------------------------------------------------------- | --------------------- |
| **App ID**       | TikTok for Business Developers > your app > Basic Information | `7123456789012345678` |
| **App Secret**   | Same page                                                     | `a1b2c3...`           |
| **Access Token** | Response of the auth code exchange                            | `1a2b3c...`           |

***

## Related

<CardGroup cols={2}>
  <Card title="White-label Connections" icon="tag" href="/core-concepts/white-label-connections">
    Overview of custom app connections across channels
  </Card>

  <Card title="Get Report" icon="chart-line" href="/nodes/tiktok_ads/tiktok_ads_get_report">
    Pull TikTok Ads performance data
  </Card>
</CardGroup>
