## TikTok integration TikTok is a short-form video platform with a global community of creators. Integrating TikTok with Frontegg lets your application read user profile and statistics data, list creator videos, and publish content to TikTok on behalf of your users through OAuth 2.0 authentication backed by the Login Kit and Content Posting API products. Prerequisites - A TikTok developer account at [developers.tiktok.com](https://developers.tiktok.com/) - A TikTok account that owns or has admin access to the app ### Connect TikTok #### Step 1: Open the developer portal Navigate to [developers.tiktok.com/apps](https://developers.tiktok.com/apps) and log in with your TikTok developer account. The **Manage apps** page lists all applications connected to your account. Click **Connect an app** to register a new application. ![TikTok developer portal Manage apps page](/assets/tiktok-1.9758465ba8d5fdabd0f321c0c1a9d710b94fe3dc020ccea26736f09f86d84d90.1ce25488.png) #### Step 2: Choose the ownership type Select **Individual** for personal apps, or **Organization** if you have already created one. Click **Confirm** to continue. ![TikTok ownership selection dialog](/assets/tiktok-2.6713b9010029e43cf9b3b8342658b6a67f7554ad7c40cb0b6a5602255065f01a.1ce25488.png) #### Step 3: Name the app and select the type Fill in the **App name** (for example, `Frontegg Integration`) -- this is shown to TikTok users on the consent screen. Select **Other** as the **App type**, since you will be combining Login Kit and Content Posting API. App type cannot be changed later TikTok locks the app type after creation, so make sure **Other** is selected before continuing. Click **Create app** to provision the application. ![TikTok create app form with name and type](/assets/tiktok-3.9bc914a05850afc0015ef0df4d561bdab8cc7396d7193549b6ebd132fed712e1.1ce25488.png) #### Step 4: Copy your credentials After the app is created you are redirected to its **App details** page. Scroll to the **Credentials** section to find: - **Client key** -- TikTok's name for the OAuth Client ID. Click the eye icon to reveal it. - **Client secret** -- the OAuth Client Secret. Click **Show** and treat this value like a password. Copy both values and store them securely -- you will paste them into the Frontegg portal in the final step. Keep your credentials secure Never share or commit your Client secret to version control. If it leaks, regenerate it from this page. ![TikTok Client key and Client secret in Credentials section](/assets/tiktok-4.6b8140ad1fc2843f1be5e82c98089b53a9899fc462baafce4e8a379aa3a3b09d.1ce25488.png) #### Step 5: Add products Scroll to the **Products** section and click **Add products**. The Frontegg integration requires: - **Login Kit** -- grants the `user.info.*` and `video.list` scopes. - **Content Posting API** -- grants the `video.upload` scope. Click **Add** next to each product, then **Done**. Content Posting API requires Login Kit, so add Login Kit first. ![TikTok Add products dialog with Login Kit and Content Posting API](/assets/tiktok-5.8fb52e25ed5a05439dfafa94a955506e3875b1246ce5e7a57aaba171bbcd49d4.1ce25488.png) #### Step 6: Configure OAuth scopes In the **Scopes** section, click **Add scopes** and add the following scopes used by the integration: | Scope | Description | | --- | --- | | `user.info.basic` | Read a user's profile info (open id, avatar, display name, ...) | | `user.info.profile` | Read access to profile_web_link, profile_deep_link, bio_description, is_verified | | `user.info.stats` | Read a user's statistical data (likes count, follower count, following count, video count) | | `video.list` | Read a user's public videos on TikTok | | `video.upload` | Share content to a creator's account as a draft to further edit and post in TikTok | `user.info.basic` and `video.upload` are added automatically when you enable Login Kit and Content Posting API. Use **Add scopes** to add the remaining three. Minimum required scopes For basic functionality, you need: `user.info.basic`. ![TikTok scopes list with all five scopes added](/assets/tiktok-6.f077541019f289f5015bb8af864b4ad2a76ec72cedc738a12bd820b2cd9cbd9c.1ce25488.png) #### Step 7: Configure the redirect URI In the **Basic information** section, check **Web** under **Platforms** to expose the Login Kit's web configuration. Then scroll to the **Login Kit → Web → Redirect URI** field and enter your Frontegg Redirect URL: - `https://YOUR_MCP_GATEWAY_URL/integration-callback` Click **Add a URI** to save it. Then click **Save** at the top of the page to persist the app configuration. ![TikTok Login Kit redirect URI configuration](/assets/tiktok-7.b309af7f363299e25302c2225bd946fe6654c1a2feccc2775a6ee5af0e5c5b71.1ce25488.png) App review for production traffic New TikTok apps start in **Draft** status with sandbox-only access. To grant tokens to end users outside your developer account, complete the **App review** section (description, demo video, terms and privacy URLs) and click **Submit for review**. Approval is required before the app can serve production users. ### Configure the Frontegg portal Once you have obtained your **Client key** and **Client secret** from the steps above, enter them in the integration configuration page of the Frontegg portal: 1. Open the **Frontegg portal** and navigate to [ENVIRONMENT] → Integrations → TikTok. 2. Enter the **Client key** as the **Client ID** and the **Client secret** as the **Client Secret**. 3. Select the required **scopes**. 4. Click **Save**. ### Additional resources - [TikTok Login Kit documentation](https://developers.tiktok.com/doc/login-kit-web) - [TikTok Content Posting API documentation](https://developers.tiktok.com/doc/content-posting-api-get-started) - [TikTok scopes reference](https://developers.tiktok.com/doc/tiktok-api-scopes) - [TikTok developer portal](https://developers.tiktok.com/apps) - [How to get your Redirect URL](/agen-for-work/connectors/redirect-url)