Configurable TikTok OAuth scopes for apps without the Display API - #315
Open
gynsus wants to merge 1 commit into
Open
Configurable TikTok OAuth scopes for apps without the Display API#315gynsus wants to merge 1 commit into
gynsus wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 barescopeerror, and there is no way to connect TikTok at all on a new self-hosted install.The fix
Requested scopes come from config:
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 withoutuser.info.profile.Testing
TikTokControllerTestpasses. 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).