Sales & Marketing

Connect TikTok to Postiz: Step-by-Step Setup Guide

J
James Eriksson
··15 min read
Connect TikTok to Postiz with our step-by-step setup guide. Learn OAuth scopes, sandbox mode, environment variables, and fixes for common connection errors.
TL;DR
  • Connect TikTok to Postiz in 15-30 minutes with OAuth scopes, Client Key, and redirect URL configuration
  • Sandbox mode is normal: your app starts in sandbox where only you can post until TikTok audits (1-4 weeks)
  • Self-hosted Postiz requires HTTPS, a public domain, and environment variables; Postiz Cloud handles all of this
  • Common errors like redirect_uri_mismatch and invalid_client_key have specific fixes documented in this guide

Connecting TikTok to Postiz requires setting up a TikTok Developer App with the right OAuth scopes, then authorizing it in Postiz. The process takes 15-30 minutes if you follow the exact steps, but small mistakes in scope selection or redirect URI format will block the connection. Here is exactly what you need to do, plus the errors to avoid.

Before You Start: Prerequisites & Requirements

You cannot connect TikTok to Postiz without a few things in place first. Skipping these will waste 30 minutes debugging.

Your TikTok account must be a business or creator account. Personal accounts cannot be approved to post via third-party apps. If you have a personal account, convert it to a creator account in TikTok settings before starting.

Your Postiz instance needs HTTPS with a public domain name. TikTok's OAuth system requires a public HTTPS callback URL. If you are running self-hosted Postiz on localhost or a private IP, the connection will fail. You need something like "postiz.yourcompany.com" with a valid SSL certificate. If you are using Opsily Postiz Cloud, this is already handled for you automatically.

You need access to the TikTok Developer Portal at developer.tiktok.com. Create a free developer account if you don't have one already. This is separate from your main TikTok account.

You need TikTok's Platform Agreement acceptance. Before creating your first developer app, TikTok requires you to review and accept the Platform Agreement. Do this now, not later. It takes two minutes and avoids delays later.

For self-hosted Postiz, you need Docker running with environment variables already configured. You should know how to edit your.env file and restart the Postiz container. If you are uncomfortable with this, Postiz Cloud is simpler.

On the Postiz side, you need to know your Postiz domain URL. For Postiz Cloud, this is provided. For self-hosted, you control it. You will need to construct the OAuth callback URL: https://yourpostiz.domain.com/auth/tiktok/callback. Write this down now, you will need it in the next step.

Step 1: Create Your TikTok Developer App

Go to developer.tiktok.com and log in with your TikTok account.

Click "App" in the left sidebar, then "Create an app".

Choose "Commercial" as the app type. You cannot use Personal for posting to TikTok.

Give your app a name. Something like "Postiz Integration" works fine. This name is internal, users do not see it.

Under "Application Category", select the one that matches your use case. If you are posting content videos, choose "Media" or "Entertainment". If you are posting marketing content, choose "E-commerce" or "Business Services". This is not critical but helps TikTok understand your intent.

Accept the terms and conditions. TikTok will ask you to confirm again that you have read the Platform Agreement.

Click "Create app".

TikTok now shows you your app credentials page. You will see:

  • Client Key (also called App ID)
  • Client Secret
  • Redirect URL field (we will fill this in the next section)

Do not close this page. Copy your Client Key and Client Secret into a text editor. You will need these in Step 3 (if you are running self-hosted Postiz).

Next, you need to add the permissions your app will use. In the app console, go to the "Permissions" tab. This is where you request the OAuth scopes. Do not skip this. If you do not request the right scopes, TikTok will not grant them later, and Postiz will not be able to post.

Stay on this permissions page. We will configure the scopes in the next step.

Step 2: Request the Right OAuth Scopes

Scopes are permissions. They tell TikTok what your app is allowed to do. Request too few, and posting will fail. Request too many, and TikTok's approval takes longer.

For Postiz, you need these scopes:

  • video.init (allows uploading videos)
  • video.publish (allows publishing videos)
  • user.info.basic (allows reading your account info)

In the TikTok Developer console, under Permissions, request these three scopes. You do this by clicking "Request permissions" next to each one.

Here is the important bit: you will not see "video.create" in the scope list. This is normal and expected. "video.create" only becomes available after TikTok audits your app. Developers get confused by this. Do not think something is wrong. Request video.init and video.publish, and that is enough.

Each scope does a specific job:

  • video.init: Tells TikTok your app can upload video files to your account. Without this, you cannot upload.
  • video.publish: Tells TikTok your app can publish videos. This is the actual "post now" permission. Without this, your videos stay in drafts.
  • user.info.basic: Tells TikTok your app can read your account name and basic profile info. Postiz uses this to confirm which account is connected.

After you request these scopes, TikTok may ask for additional info: your app's purpose, where you host it, what you plan to do with the data, etc. Answer these honestly. TikTok's review is automated initially, then manual if flagged.

Once you have requested the scopes, go back to the main app settings page. Scroll to "Redirect URL" and paste the callback URL. This is the exact URL where TikTok will send you back after you authorize the app.

The format is: https://yourpostiz.domain.com/auth/tiktok/callback

If you are on Postiz Cloud, Opsily provides this URL. If you are self-hosted, use your domain.

Paste this URL exactly as it appears. A trailing slash, a different protocol (http vs https), or a typo will cause "redirect_uri_mismatch" errors later.

Step 3: Configure Environment Variables (Self-Hosted Only)

This step only applies if you are running Postiz on your own server. Skip this if you are using Postiz Cloud.

Your Postiz container needs to know your TikTok Client Key and Client Secret. You set this via environment variables in your.env file.

Open your Postiz.env file (usually in your docker-compose directory or Postiz installation folder).

Add these two lines:

TIKTOK_CLIENT_KEY=<your client key from TikTok console>
TIKTOK_CLIENT_SECRET=<your client secret from TikTok console>

Paste the exact values from your TikTok app console. Do not add quotes or spaces. Whitespace breaks environment variable parsing.

Save the.env file.

Restart your Postiz Docker container:

docker-compose down
docker-compose up -d

Or, if you use plain Docker:

docker restart <postiz-container-name>

Wait for the container to be healthy. This usually takes 10-20 seconds.

Reload your Postiz browser window. The TikTok integration option should now appear in the Integrations menu.

If TikTok does not appear in Integrations:

  1. Confirm the environment variables are spelled correctly
  2. Check your Docker logs: docker logs <container-name>
  3. Confirm HTTPS is enabled on your Postiz domain
  4. Restart the container again

Once you see TikTok in Integrations, move to Step 4.

Step 4: Connect TikTok in Postiz UI

Now you are in Postiz. It is time to actually connect your TikTok account.

Log into Postiz and go to Integrations (usually a left sidebar menu or settings area).

Find TikTok in the social media list. Click "Connect" or "Add Account".

Postiz opens a popup or new window for TikTok's OAuth authorization page.

You see a login screen that says "Connect your TikTok account to Postiz". This is TikTok's official permission screen, not a Postiz page.

Log in with your business or creator TikTok account (the same account you want to post from).

TikTok shows you the permissions Postiz is requesting: video.init, video.publish, user.info.basic.

Review them and click "Allow" or "Authorize".

TikTok redirects you back to Postiz with a confirmation message: "TikTok connected" or similar.

You are done. Your TikTok account is now linked to Postiz.

At this point, your app is in "sandbox mode". This is TikTok's default. Sandbox mode means you can post to your own account only, and the videos will be private by default. This is not a bug or error. It is intentional. TikTok does this to prevent abuse.

Your app will stay in sandbox mode until TikTok audits it. This takes 1-4 weeks. During the audit period, you can still test posting and Postiz integration. The videos just will not be public.

If you want to post publicly or post to other accounts, you need to request production access in the TikTok Developer console. TikTok will ask why. Explain that you use Postiz to schedule social media. TikTok then audits your app more thoroughly and either approves or denies production access.

Common Setup Errors & How to Fix Them

These are the errors you will actually encounter. I am including the exact error messages so you can find this section via Google.

Error: "invalid_client_key"

This means you pasted the wrong Client Key into your.env file, or it has a typo. Double-check the exact value in the TikTok Developer console. Copy it again, character by character. Paste it into your.env file. Restart Postiz. Try again.

Error: "redirect_uri_mismatch"

This means the callback URL you pasted in the TikTok console does not match the one Postiz is using. The mismatch is usually one of these:

  • Missing "https://" (TikTok requires HTTPS)
  • Extra slash at the end: /auth/tiktok/callback/ instead of /auth/tiktok/callback
  • Wrong domain name: test.com vs test-postiz.com
  • Typo in "auth" or "tiktok" or "callback"

Fix: Go back to the TikTok console, check the redirect URL field, and make sure it matches exactly. If you are self-hosted, make sure your domain name is correct. If you are on Postiz Cloud, ask Opsily for the exact callback URL.

Error: "invalid_request" or "client authentication failed"

This usually means HTTPS is not working on your domain. TikTok requires HTTPS. If you have a self-hosted Postiz with a public domain but no SSL certificate, this error occurs.

Fix: Set up an SSL certificate (use Let's Encrypt via Nginx, Caddy, or your reverse proxy). Restart Postiz. Try again. If you do not want to manage SSL, use Postiz Cloud.

Error: "app_not_audited" or "Invalid Request - The app is not approved to make this request"

This appears when you try to post (not during connection, but later). It means your TikTok app is in sandbox mode, so you can only post to your own account. This is not an error. It is expected behavior.

Fix: Nothing to fix. You can post to your own account and test. Wait for TikTok to audit your app (1-4 weeks). After audit, production access unlocks and you can post publicly.

Error: "Timeout during authorization"

Your browser connection dropped, or TikTok took too long to respond. This is rare.

Fix: Refresh the page and try connecting again. If it persists, clear your browser cache and cookies, then try again.

Self-Hosted vs Postiz Cloud: Key Differences

If you are evaluating whether to self-host Postiz or use Postiz Cloud, the TikTok integration highlights the tradeoffs.

Self-Hosted Postiz

You run Postiz on your own server. You manage everything: Docker, environment variables, SSL certificates, backups, uptime.

With self-hosting, you set up the TikTok integration yourself. You edit the.env file, add the Client Key and Secret, restart the container. You need a public HTTPS domain. You handle all OAuth configuration.

When you connect TikTok, your app starts in sandbox mode. You request production access in the TikTok Developer console. TikTok reviews your app and approves or denies it. The timeline is unpredictable. Approval times vary from 3 days to 4 weeks.

Self-hosted Postiz gives you full control and no monthly fee. The tradeoff: you own the operational overhead. If the app crashes, you restart it. If OAuth breaks after a Postiz update, you debug it. If TikTok's API changes, you update your configuration.

Postiz Cloud

You use Postiz's hosted version at postiz.com. Opsily manages the infrastructure, SSL, backups, and uptime.

With Postiz Cloud, you go to Integrations, click TikTok, authorize, and you are done. You do not touch environment variables, do not manage domains, do not handle SSL. Opsily has already configured the OAuth callback URL in the TikTok Developer console. Your app works immediately.

TikTok audit still applies. Your app starts in sandbox mode. You request production access. TikTok still takes 1-4 weeks to review. This timeline is the same for both self-hosted and cloud.

Postiz Cloud costs $29/month and up, depending on how many accounts and social channels you need. You get a 7-day free trial. The monthly cost replaces your infrastructure costs (hosting, domain, SSL) and your time managing the server.

For TikTok specifically, both paths end at the same place: sandbox mode until TikTok audits. The difference is the getting-there part. Self-hosted is cheaper but requires technical setup. Postiz Cloud is easier but costs a monthly fee.

If you want to skip the self-hosted complexity, Opsily's managed Postiz hosting handles HTTPS, restarts, and OAuth so you can focus on content.

What Happens After TikTok Connection: Limits and Audit

After you connect TikTok to Postiz and authorize it, you have posted nothing yet. Understand what happens now.

Your app is in "sandbox mode". In sandbox mode:

  • You can post to your own TikTok account only
  • You can post up to 5 videos per day
  • Your videos appear as "Private" (you control this, but the default is private)
  • No other account can use this app to post

This is intentional. TikTok defaults all new apps to sandbox mode to prevent abuse. It is not a limitation of Postiz. It is a TikTok security measure.

From Postiz, you can now compose a video and post it to TikTok. The post goes through successfully. You see your video on TikTok as Private or Public (depending on what you set in Postiz). Postiz shows the post as "published".

TikTok's review process starts immediately. In the background, TikTok's systems review your app. They check:

  • Does your app follow the TikTok Platform Agreement?
  • Are you using it for legitimate posting, not spam or manipulation?
  • Have you configured the OAuth scopes correctly?
  • Is your Postiz use case legitimate?

This audit takes 1-4 weeks. The exact timeline is unpredictable. Some apps are approved in 3 days. Others take 4 weeks. TikTok does not send updates during the review.

When TikTok approves your app, you get an email and a notification in the Developer console. Your app moves from "sandbox" to "production". Now you can:

  • Post to any TikTok account (not just your own)
  • Post unlimited videos per day (within TikTok's rate limits)
  • Post as Public without special settings

Until TikTok approves your app, stay in sandbox mode. Test Postiz's TikTok integration by posting to your own account. Make sure videos upload correctly. Check that captions and hashtags work. Iron out any kinks in your workflow. By the time TikTok approves, you will be ready to post at scale.

Frequently Asked Questions

Is TikTok app approval required before I can post from Postiz?

Yes, but with a caveat. Your TikTok app starts in sandbox mode after you connect. In sandbox mode, you can post to your own account immediately. You do not need approval to do this. However, your videos are private by default. To post publicly or to other accounts, you need TikTok to audit your app and move it from sandbox to production. This audit takes 1-4 weeks.

What are the TikTok OAuth scopes, and why does my app need them?

Scopes are permissions. Your Postiz app needs three: video.init (upload videos), video.publish (post them), and user.info.basic (read your account info). Without video.init, you cannot upload video files. Without video.publish, videos stay as drafts. Without user.info.basic, Postiz cannot confirm which TikTok account is connected. Each scope serves a specific purpose.

Why does the TikTok Developer console not show "video.create" as an option?

"video.create" only appears after your app is approved for production. Until then, TikTok hides it. This confuses developers, but it is intentional. TikTok starts you with limited permissions. You request video.init and video.publish, which are enough for Postiz to work in sandbox. After approval, video.create becomes available if you need more granular controls.

What is the redirect URL, and why do I need to set it exactly right?

The redirect URL is where TikTok sends you back after you authorize. If you are on Postiz Cloud, it looks like https://postiz.com/auth/tiktok/callback. If you are self-hosted, it is https://yourdomain.com/auth/tiktok/callback. A typo or mismatch causes "redirect_uri_mismatch" errors. Copy and paste carefully.

What does sandbox mode mean, and why am I stuck in it?

Sandbox mode is TikTok's default for new apps. It limits you to your own account and private posts. This is a security feature. TikTok uses sandbox to prevent spam and abuse. You are not stuck. After TikTok audits your app (1-4 weeks), you move to production and the limits lift.

Can I post to TikTok immediately after connecting Postiz, or must I wait?

You can post immediately to your own account. Your videos are private and visible only to you. You do not need to wait for TikTok's audit to test Postiz. After the audit, you can post publicly and to other accounts.

What is the difference between Direct Post and Upload without posting?

Direct Post means Postiz uploads your video and immediately publishes it to your TikTok account. Upload without posting means Postiz uploads the video as a draft, and you publish it manually from TikTok. Use Direct Post for automation. Use Upload without posting if you want to review before publishing.

Why does my TikTok post appear as Private even though I selected Public in Postiz?

Your app is in sandbox mode. TikTok defaults all posts from sandbox apps to private. This is by design. After your app is approved for production, public posts will stay public. Until then, all posts are private regardless of what you set in Postiz.

The Bottom Line

Connecting TikTok to Postiz is straightforward if you get the OAuth details right. The biggest friction points are sandbox mode (expected) and HTTPS requirements on self-hosted systems (non-negotiable). Once you are connected, you can schedule TikTok posts from one dashboard. Ready to integrate TikTok and schedule posts from one dashboard? Get started today.

Ready to schedule TikTok posts?
Opsily's managed Postiz hosting handles OAuth configuration, HTTPS, and restarts so you can focus on content.
Get Started Free

Ready to self-host your own apps?

One server. Multiple apps. No per-app fees.

Get started →