Skip to content

LinkedIn

OAuth 2.0 with OpenID Connect. Sosyabot calls /v2/userinfo after the token exchange and stores only the access token. The OIDC sub claim becomes the channel's stable ID.

Authentication at a glance

FieldValue
Auth modelOAuth 2.0
Required ENVLINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRET
Callback URL${BASE_URL}/api/v1/auth/linkedin/callback
Scopes / permissionsopenid, profile, w_member_social
Auto token refreshNo — manual reconnect on expiry

How to connect

  1. Open ConnectionsLinkedInConnect.
  2. Sign in to LinkedIn and grant the OIDC scopes.
  3. On return, the channel appears under your connections.

Token refresh

LinkedIn access tokens have a ~60-day lifetime in the Marketing Developer Program. Sosyabot doesn't auto-refresh them; reconnect when expired.

Notes

  • LinkedIn migrated to OIDC for profile reads in 2023 — the legacy r_liteprofile scope is no longer requested.
  • Posting goes through w_member_social. To post on Company Pages instead of personal profiles, the LinkedIn app must hold w_organization_social and the user must be a Page admin (not enabled by default in this build — request from the admin).
  • Username is not stored on the Sosyabot channel record (username: "").

Troubleshooting

If the channel shows needs_reconnect, the access token was rejected by LinkedIn. Common causes:

  • The user revoked Sosyabot's authorization on the platform.
  • The platform invalidated the token (password change, security event).
  • Your OAuth app credentials rotated and the existing tokens no longer match.

Re-run the connect flow above. See Troubleshooting for the workspace-wide checklist.