Publit.Si

Connect TikTok

Until TikTok audits your app, posts through its API can only be private (Only me). So public video posts go through TikTok Studio: at the scheduled time Publit.Si opens it in Chrome, the extension fills in video and caption, and you click Post.

You need

  • The tunnel from step 3
  • A TikTok account and a login for developers.tiktok.com
  • A 1024×1024 icon for the app (any image of yours)
  • Google Chrome

Create the TikTok app and sandbox

  1. Open developers.tiktok.com → Manage apps → Connect an app, platform Web.

    TikTok for Developers, Manage apps with the Connect an app button and one app
    1. 1:Connect an app
    2. 2:Your app
    Manage apps → Connect an app (platform Web).
  2. Create a sandbox for the app. It needs the icon, a category and privacy and terms URLs: use https://publish.example.com/privacy and https://publish.example.com/terms. Your gateway serves them.

Add products and scopes

  1. Switch to Sandbox → Products → Add products: Login Kit and Content Posting API (turn on Direct Post). Only for statistics also Display API.

    TikTok app in Sandbox, Products: Login Kit with a redirect URI and Content Posting API with Direct Post switched on
    1. 1:Sandbox
    2. 2:Login Kit
    3. 3:Content Posting API
    4. 4:Direct Post
    Sandbox → Products: Login Kit and Content Posting API with Direct Post on. Display API only for statistics.
  2. Scopes: user.info.basic, user.info.profile, video.upload, video.publish. For statistics (TIKTOK_ANALYTICS=1) also user.info.stats and video.list; video.list comes with Display API.

    TikTok app scopes: user.info.basic, video.publish, video.upload and two more user info scopes
    1. 1:user.info.basic
    2. 2:video.publish
    3. 3:video.upload
    Scopes: Publit.Si needs these three. For statistics also user.info.stats and video.list (Display API).

Set the redirect URI and test user

  1. Copy the redirect URI from Publit.Si › Settings › Platform setup › TikTok, e.g. https://publish.example.com/oauth/tiktok/callback. Login Kit → Redirect URI → Web → paste it.

    Login Kit with the Web tab and the redirect URI of the tunnel
    1. 1:Web
    2. 2:Redirect URI
    Login Kit → Web → the redirect URI from Publit.Si.
  2. Sandbox settings → Target Users → Add account: your TikTok account.

    TikTok Sandbox settings, Target Users with the Add account button and two added accounts
    1. 1:Sandbox settings
    2. 2:Add account
    Sandbox settings → Target Users → Add account: your TikTok account.
  3. Click Apply changes (top right). Sandbox changes only count after that.

  4. Photo posts only: under URL properties, verify your tunnel domain with the DNS TXT record TikTok shows (add it in Cloudflare → DNS).

Enter the keys

  1. Copy the sandbox Client key and Client secret into Publit.Si under Enter credentials, or .env:

    TIKTOK_CLIENT_KEY=…
    TIKTOK_CLIENT_SECRET=…
    TIKTOK_ANALYTICS=1   # if you added the statistics scopes
    Enter credentials form in Publit.Si with the Google client ID filled in and the secret field empty
    1. 1:Client ID
    2. 2:Save and apply
    Enter credentials writes the keys into .env for you and restarts the services. Secrets are never shown again.

Install the Chrome extension

Do this once in every Chrome profile you use for TikTok.

  1. Open chrome://extensions and switch on Developer mode (top right).

  2. Load unpacked → choose the extension/ folder in your publitsi folder.

    chrome://extensions with Developer mode on, the Load unpacked button and the Publit.Si Helper card
    1. 1:Developer mode
    2. 2:Load unpacked
    3. 3:Publit.Si Helper
    chrome://extensions → Developer mode on → Load unpacked → the extension/ folder.
  3. Chrome shows a notice about developer-mode extensions. That's normal for extensions you load yourself.

After an update, click ↻ on the extension in chrome://extensions in each profile.

Check

Settings › Platform setup › TikTok shows every item as set, and the extension appears in chrome://extensions in each TikTok profile.

Common problems

Stuck? Write to us. We're happy to help. Leave out secrets and tokens.