Appearance
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
| Field | Value |
|---|---|
| Auth model | OAuth 2.0 |
| Required ENV | LINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRET |
| Callback URL | ${BASE_URL}/api/v1/auth/linkedin/callback |
| Scopes / permissions | openid, profile, w_member_social |
| Auto token refresh | No — manual reconnect on expiry |
How to connect
- Open Connections → LinkedIn → Connect.
- Sign in to LinkedIn and grant the OIDC scopes.
- 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_liteprofilescope is no longer requested. - Posting goes through
w_member_social. To post on Company Pages instead of personal profiles, the LinkedIn app must holdw_organization_socialand 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.