Connection Health Monitoring
A daily sweep across every X, LinkedIn, Threads, YouTube and TikTok connection that refreshes tokens first, then warns you before a post fails instead of after.
OAuth connections to social and video platforms expire quietly. Nobody notices until a scheduled post fails, hours or days after the token actually went bad. Connection health monitoring closes that gap: one shared check runs daily across every connection on every site, and it tries to fix the problem — a real token refresh — before it ever reports a warning.
What it checks
Five channels: X (Twitter), LinkedIn, Threads, YouTube, and TikTok. Each active connection is checked once a day:
-
Try a real refresh first. For every platform that supports it (LinkedIn, Threads, YouTube, TikTok), the check calls the platform's actual token-refresh endpoint rather than trusting whatever expiry date is already stored. X is OAuth1 and has no refresh concept at all — its health is simply whether the connection is still active.
-
Classify the result. A successful refresh is
healthy, with the corrected expiry written back immediately. A failed refresh, or a token expiring within 3 days with nothing to refresh it, is reported honestly:Status Meaning healthyRefreshed successfully, or not close to expiry expiringExpires within 3 days — nothing is broken yet expiredThe token is past its expiry, or the refresh attempt itself failed disconnectedThe connection was deactivated (X) or cannot be refreshed and is already past expiry -
Notify once a day, not once a check. An owner is emailed for an
expiringorexpiredconnection, but at most once every 24 hours per connection — the daily sweep does not re-send the same warning five times in a row while the problem sits unresolved.
This is read + refresh-attempt + classify + notify only. The check never posts anything and never reconnects an account on your behalf — reconnecting always takes you through the platform's OAuth flow.
Why a real refresh attempt matters
Threads and YouTube both refresh their stored token lazily — only when the channel is actually used to publish. A channel that has not posted in a while can show a token_expires_at safely in the past while the underlying refresh token is still perfectly valid. Classifying from that stale stored date alone would falsely report a healthy, unused channel as expired.
Calling the real refresh endpoint first sidesteps that: if the refresh succeeds, the connection is healthy and the stale date is corrected on the spot, regardless of what was stored before the check ran. If the refresh genuinely fails, that's a real problem worth surfacing.
Where it shows up
Admin UI. The YouTube, TikTok, Threads and LinkedIn connection pages (/admin/youtube, /admin/tiktok, /admin/threads, /admin/linkedin) show a small status badge next to the connected account — Healthy, Expiring soon (with the date), or Reconnect needed — wired to the existing Reconnect button.
MCP tools. get_x_accounts, get_linkedin_accounts, get_threads_accounts, get_youtube_accounts and get_tiktok_accounts each return a health object per account:
{
"health": {
"status": "expiring",
"needs_reconnect": false,
"checked_at": "2026-10-24T13:00:00.000Z"
}
}
needs_reconnect is true for expired and disconnected, false otherwise. checked_at is null for a connection the daily sweep hasn't checked yet — the account was just connected — in which case status falls back to a live classification from whatever is already stored, so the field is never missing.
Email. The site owner gets an email naming the channel, the account, and a direct reconnect link, for any connection the sweep finds expiring or expired.
What it does not do
- It does not post anything, ever.
- It does not reconnect an account automatically — only a human completing the OAuth flow can do that.
- It does not cover
instagramorfacebook_page(code exists for both but neither has a live connect flow yet) ortypefully(no OAuth/expiry concept).