Connections and slugs
A connection is an OAuth link to one social account: an Instagram business page, a LinkedIn profile, an X handle, a Facebook page, etc.
Every connection has a stable, human-readable slug like:
instagram-mybrandlinkedin-myhandlex-myhandlefacebook-mypagetiktok-mebluesky-myhandle-bsky-socialyoutube-mychannelpinterest-mypinreddit-myhandlethreads-myhandle
The slug is generated when you first connect the account and never changes (even if you revoke and reconnect — it's keyed by the platform user ID). Always use slugs in your code, never platform names or raw ObjectIds.
Listing connections
const connections = await socifyr.workspaces.listConnections(workspaceId)
for (const c of connections) {
console.log(`${c.slug} → ${c.platform} (${c.targetName})`)
}socifyr connectionscurl -H "Authorization: Bearer sk_..." \
-H "X-Workspace-Id: <workspaceId>" \
https://api.socifyr.com/api/workspaces/<workspaceId>/connectionsConnecting a new account
Connections are made via OAuth in the web dashboard — there is no programmatic way to start an OAuth flow from the SDK. Visit Settings → Integrations in the dashboard, click the platform, and authorize.
Supported platforms
| Platform | Photo | Video | Text | Carousel | Story | Reels | Document |
|---|---|---|---|---|---|---|---|
| ✓ | ✓ | — | ✓ | ✓ | ✓ | — | |
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | — | |
| ✓ | ✓ | ✓ | ✓ | — | — | ✓ | |
| X (Twitter) | ✓ | ✓ | ✓ | ✓ | — | — | — |
| TikTok | — | ✓ | — | — | — | ✓ | — |
| YouTube | — | ✓ | — | — | — | ✓ | — |
| Threads | ✓ | ✓ | ✓ | ✓ | — | — | — |
| Bluesky | ✓ | ✓ | ✓ | ✓ | — | — | — |
| ✓ | ✓ | — | — | — | — | — | |
| ✓ | ✓ | ✓ | — | — | — | — |
For exact character limits, supported aspect ratios, and platform-specific quirks, see platform-constraints.ts in packages/shared.
Token expiry
OAuth tokens expire (typically 60–90 days, varies by platform). Socifyr:
- Tracks
expiresAtfor every connection - Sends an email warning 7 days before expiry
- Renews tokens in the background (and once more on an auth error while publishing) when the platform issues a refresh token
- Reports a
statuson every connection:active,expiring, orneeds_reconnect - Fails publishes that hit a dead token with a
reconnect_requirederror that names the slug and the fix
Reconnecting without the dashboard
You never have to leave your agent or script to fix an expired account:
| Surface | Renew silently (if the platform allows) | Re-authorize (owner opens a link) |
|---|---|---|
| MCP | refresh_connection | reconnect_connection |
| CLI | socifyr connections refresh <slug> | socifyr connections reconnect <slug> |
| SDK | workspaces.refreshConnection(workspaceId, slug) | workspaces.getReconnectLink(slug) |
| REST | POST /api/workspaces/:id/connections/:slug/refresh | POST /api/oauth/connections/:slug/reconnect-link |
The reconnect link is short-lived (10 minutes) and single-use, contains no access token, and updates the existing connection in place when the owner approves the same account (approving a different account creates a new connection), so the slug and any scheduled posts keep working. Open it yourself rather than pasting it into chat apps: link-preview bots can use up a single-use link. Only the workspace owner can approve it; keys with guardrails (daily limits, approval required) cannot mint one. The dashboard Reconnect button still works too.
Disconnecting
// Remove from your workspace (keeps platform access intact)
await socifyr.workspaces.disconnectPlatform(workspaceId, connectionId)
// Revoke the OAuth token AND remove from your workspace
await socifyr.workspaces.revokePlatform(workspaceId, connectionId)