Skip to content

Configurable TikTok OAuth scopes for apps without the Display API - #315

Open
gynsus wants to merge 1 commit into
trypostit:mainfrom
gynsus:pr/tiktok-scopes
Open

Configurable TikTok OAuth scopes for apps without the Display API#315
gynsus wants to merge 1 commit into
trypostit:mainfrom
gynsus:pr/tiktok-scopes

Conversation

@gynsus

@gynsus gynsus commented Aug 30, 2026

Copy link
Copy Markdown

The problem

TikTok no longer offers the Display API product to new apps. That product owns three of the six scopes the controller hardcodes — user.info.profile, user.info.stats, video.list — so a freshly registered TikTok app (Login Kit + Content Posting API is all you can add today) fails the consent screen with a bare scope error, and there is no way to connect TikTok at all on a new self-hosted install.

The fix

Requested scopes come from config:

TIKTOK_SCOPES=user.info.basic,video.publish,video.upload

with the default unchanged (all six scopes), so existing installs are unaffected. The rest of the integration already degrades gracefully when the trimmed scopes are missing: analytics show nothing for a token without user.info.stats, and the username simply stays empty without user.info.profile.

Testing

TikTokControllerTest passes. Verified live on a self-hosted install with a 2026-registered TikTok app: with the trimmed scope list the consent screen renders, the account connects, and Direct Post publishing works (to a private account until the app passes TikTok's audit, per their unaudited-client policy).

TikTok no longer offers the Display API product to new apps, which owns
user.info.profile, user.info.stats and video.list — a stock app can only
enable Login Kit + Content Posting API, and the hardcoded six-scope
request then fails on the consent screen with a bare "scope" error.
Scopes now come from config (default unchanged) so self-hosters can trim
the request to what their app actually has; analytics degrade gracefully
and the username simply stays empty without the profile scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant