TikTok Login Kit v2 & Content Posting API v2

TikTok Integration & Content Sharing Compliance Guide

Rich Clips Studio by Gendrox (www.gendrox.com) integrates directly with official TikTok v2 APIs so gaming creators can authenticate securely via OAuth 2.0 PKCE and deliver creator-reviewed 9:16 vertical clips through either Share to Inbox (Draft) or Direct Post—with zero background auto-posting and full adherence to TikTok’s UX and Content Sharing Guidelines.

1. OAuth 2.0 PKCE (S256) Authentication Flow

Every TikTok connection is initiated explicitly by the creator inside their local Studio workstation and protected end-to-end with Proof Key for Code Exchange (S256) and local authenticated encryption.

Step 1 · Authorize

PKCE Verifier & Signed Nonce

Clicking Connect TikTok Account generates a single-use cryptographic code_verifier, derives its SHA-256 code_challenge, encrypts the pending nonce in local SQLite, and opens https://www.tiktok.com/v2/auth/authorize/.

Step 2 · Stateless Relay

Zero-Secret HTTPS Callback Bounce

Our stateless HTTPS callback endpoint validates that the encoded return origin is strictly loopback (localhost / 127.0.0.1) or private RFC1918 LAN IPv4 and performs an immediate HTTP 302 redirect back to your workstation—holding zero secrets or tokens.

Step 3 · Local Vault

Direct Token Exchange & AES-256-GCM

Your local Studio exchanges the authorization code + code_verifier directly with https://open.tiktokapis.com/v2/oauth/token/, encrypts tokens via AES-256-GCM, and serializes token rotations with a per-account mutex.

2. Requested TikTok Scopes & Exact Purpose

Rich Clips Studio requests only the minimum scopes required for creator identity display and creator-initiated video publishing.

Scope TikTok v2 Endpoints Called How Rich Clips Studio Uses It
user.info.basic POST /v2/post/publish/creator_info/query/ & OAuth account identity Displays your connected TikTok @username, nickname, and avatar inside Studio so you always know which account will receive an upload, and queries live per-account clip duration limits and privacy/interaction capabilities.
video.upload POST /v2/post/publish/inbox/video/init/ & POST /v2/post/publish/status/fetch/ Uploads creator-approved 9:16 MP4 clips as private Inbox Drafts to your TikTok mobile app notifications so you can preview, add trending TikTok sounds, and finish posting on mobile.
video.publish POST /v2/post/publish/video/init/ & POST /v2/post/publish/status/fetch/ Publishes creator-reviewed vertical MP4 clips via Direct Post only after you manually choose a privacy level, review interactions and commercial disclosures, and click TikTok Direct Post.

3. Two Creator Delivery Modes: Inbox Drafts vs. Direct Post

Inside every Project Workspace, creators switch freely between mobile draft handoff and full desktop Direct Post—both protected by deterministic sha256(clipId:accountId:tiktok:mode) idempotency keys and compliant 5–64 MB byte-range chunk streaming.

Mode 1 · Mobile Handoff

Send to TikTok Inbox (Draft)

  • Calls POST /v2/post/publish/inbox/video/init/ with source = FILE_UPLOAD and streams verified HTTPS byte chunks.
  • Polls /v2/post/publish/status/fetch/ until SEND_TO_USER_INBOX is confirmed.
  • Delivers the rendered 1080×1920 clip straight to your TikTok mobile app Inbox → System Notifications for final mobile audio selection or stickers.
Mode 2 · Desktop Publishing

TikTok Direct Post

  • Runs a live preflight check against POST /v2/post/publish/creator_info/query/ whenever a clip or TikTok account is selected.
  • Submits POST /v2/post/publish/video/init/ with explicit creator-chosen post_info metadata.
  • Polls /v2/post/publish/status/fetch/ until PUBLISH_COMPLETE and notifies the creator that TikTok may take a few minutes to process and index the video on their profile.

4. TikTok UX & Content Sharing Guidelines Compliance

Our Direct Post inspector enforces every requirement of the TikTok Content Sharing Guidelines in both client UI controls and server-side validation:

Creator Info Preflight & Duration Enforcement

Before enabling Direct Post, Studio queries creator_info/query/ to render the active creator’s @username and maximum allowed video duration (max_video_post_duration_sec). Clips exceeding the creator’s duration limit or accounts temporarily restricted by spam_risk_* / daily posting caps are blocked cleanly with a clear explanation before any upload begins.

Manual Privacy Selection (Zero Default Preselection)

The privacy dropdown is populated dynamically from the creator’s privacy_level_options (PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY) and always initializes to Select privacy level... with no preselected value. Creators must manually pick visibility for every post.

Unchecked Interactions & Account-Level Overrides

Allow Comment, Allow Duet, and Allow Stitch checkboxes start unchecked by default on every clip. If creator_info reports comment_disabled, duet_disabled, or stitch_disabled in the creator’s TikTok privacy settings, the corresponding checkbox is automatically disabled and enforced server-side.

Commercial Content Disclosure & Legal Consent

Enabling the Commercial Content toggle requires selecting at least one classification—Your Brand (brand_organic_toggle) or Branded Content (brand_content_toggle). When Branded Content is checked, SELF_ONLY private visibility is automatically disabled with an explanatory notice, and dynamic consent links to TikTok’s Music Usage Confirmation and Branded Content Policy appear directly above the publish button.

One-Click Account Disconnection & TikTok Permission Revocation

Creators can disconnect any TikTok account at any time inside Rich Clips Studio → Accounts & System by clicking Disconnect, which immediately deletes the encrypted AES-256-GCM token record from local SQLite (DELETE /api/accounts/:id). You may also revoke access directly in the TikTok mobile app under Profile → Menu → Settings and privacy → Security and permissions → Apps and services permissions → Rich Clips → Remove access.