HomeDocsConnecting accounts
Guide

Connecting accounts

Connect social accounts to SocialClaw: OAuth providers via an authorize URL, Telegram with a bot token, Discord with a webhook, plus client connect links, lazy token refresh, and connection health checks.

OAuth providers. Start a connection, send the user to the returned authorizeUrl, and poll the connection until it reports connected:

curl -sS https://getsocialclaw.com/v1/connections/start \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{ "provider": "linkedin" }'

From the CLI, socialclaw accounts connect --provider x --open opens the browser for you. Plan account limits are enforced when the OAuth flow completes.

Telegram and Discord skip OAuth. Telegram connects with a bot token plus a chat target; Discord connects with a channel webhook URL:

socialclaw accounts connect --provider telegram \
  --bot-token 123456:ABC... --chat-id @yourchannel --json

socialclaw accounts connect --provider discord \
  --webhook-url https://discord.com/api/webhooks/... --json

Client connect links (for agencies). Need a client to connect their account without dashboard access? Generate a connect link from the dashboard (the paper-airplane button on a provider) and send it — they complete the OAuth flow on a branded invite page, and the account lands in your workspace.

Tokens, health, and reconnects. OAuth tokens are refreshed lazily at publish time — there is no background refresh job to babysit. The dashboard flags an account only when it genuinely needs a reconnect. Check state any time:

curl -sS "https://getsocialclaw.com/v1/connections/health?provider=linkedin" \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY"

curl -sS https://getsocialclaw.com/v1/workspace/health \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY"