[object Object]

← back to Marketing Command Center

channels: derive TikTok + YouTube account handles from env (accounts rail was blank for both)

ed9e2e290f61ef7bb7ff7c774ad487032cb6fdb4 · 2026-07-21 13:33:09 -0700 · Steve

Files touched

Diff

commit ed9e2e290f61ef7bb7ff7c774ad487032cb6fdb4
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Jul 21 13:33:09 2026 -0700

    channels: derive TikTok + YouTube account handles from env (accounts rail was blank for both)
---
 modules/channels/index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/channels/index.js b/modules/channels/index.js
index 00994d4..6fbd573 100644
--- a/modules/channels/index.js
+++ b/modules/channels/index.js
@@ -261,7 +261,7 @@ function platformStatus() {
     tiktok: {
       label: 'TikTok', icon: '🎵',
       connected: !!(env('TIKTOK_ACCESS_TOKEN')),
-      accounts: [],
+      accounts: env('TIKTOK_USERNAME') ? [env('TIKTOK_USERNAME')] : (env('TIKTOK_OPEN_ID') ? [env('TIKTOK_OPEN_ID')] : []),
       needs: 'TikTok for Developers app + Content Posting API access (audited) → user OAuth → access token. Direct-post needs app review; sandbox posts to private only.',
       scopes: ['video.publish', 'video.upload'],
       // Surfaced at publish time so a "live" post isn't mistaken for public.
@@ -270,7 +270,7 @@ function platformStatus() {
     youtube: {
       label: 'YouTube', icon: '▶️',
       connected: !!(env('YOUTUBE_ACCESS_TOKEN') || (env('GOOGLE_CLIENT_ID') && env('YOUTUBE_REFRESH_TOKEN'))),
-      accounts: [],
+      accounts: env('YOUTUBE_CHANNEL_TITLE') ? [env('YOUTUBE_CHANNEL_TITLE')] : (env('YOUTUBE_CHANNEL_ID') ? [env('YOUTUBE_CHANNEL_ID')] : []),
       needs: 'Google Cloud project + YouTube Data API v3 enabled + OAuth consent (youtube.upload scope) → channel refresh token.',
       scopes: ['https://www.googleapis.com/auth/youtube.upload'],
       // Connecting works, but uploads aren't built — a "live" post will stage.

← ca60a5c chore: v-bump (session close — TikTok token-mirror fix)  ·  back to Marketing Command Center  ·  youtube: build resumable videos.insert upload pipeline (post 85d08d7 →