Skip to content

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-mybrand
  • linkedin-myhandle
  • x-myhandle
  • facebook-mypage
  • tiktok-me
  • bluesky-myhandle-bsky-social
  • youtube-mychannel
  • pinterest-mypin
  • reddit-myhandle
  • threads-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

typescript
const connections = await socifyr.workspaces.listConnections(workspaceId)
for (const c of connections) {
  console.log(`${c.slug}  →  ${c.platform} (${c.targetName})`)
}
bash
socifyr connections
bash
curl -H "Authorization: Bearer sk_..." \
     -H "X-Workspace-Id: <workspaceId>" \
     https://api.socifyr.com/api/workspaces/<workspaceId>/connections

Connecting 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

PlatformPhotoVideoTextCarouselStoryReelsDocument
Instagram
Facebook
LinkedIn
X (Twitter)
TikTok
YouTube
Threads
Bluesky
Pinterest
Reddit

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:

  1. Tracks expiresAt for every connection
  2. Sends an email warning 7 days before expiry
  3. Marks the connection as expired once the token can't be refreshed
  4. Returns a clear error (Token has expired) on publish attempts

To re-authorize, click Reconnect next to the connection in the dashboard.

Disconnecting

typescript
// 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)