LinkedIn (sign-in & posting)

Let users sign in with LinkedIn and publish posts to their feed from your app

Overview

LinkedIn is built into Pentoggle as a first-class integration. Your app can let users sign in with their LinkedIn account, and — with the user's permission — publish posts to LinkedIn on their behalf, including text-only posts, single-image posts, and multi-image carousel posts.

What it supports

  • Sign in with LinkedIn — one-tap sign-in for your end-users; their name, email, and profile picture are pulled from LinkedIn automatically
  • Post on the user's behalf — your app can call linkedin.publishPost(...) from a function to publish text, single-image, or multi-image (2-20 images) posts to the user's LinkedIn feed
  • Automated / scheduled posts — combined with Scheduled tasks, you can build apps that auto-publish to LinkedIn on a recurring schedule (e.g., daily digests, weekly summaries) or at a specific future time
  • Token storage and refresh — Pentoggle securely stores each user's LinkedIn access token, encrypts it, and refreshes it automatically so your app code never touches client secrets or refresh logic
  • Account linking — LinkedIn sign-in links to existing email/password users when the verified email matches, so users keep one account

Example prompts

"Let users sign in with LinkedIn."

"After a user generates a marketing post in my app, give them
a 'Share to LinkedIn' button that publishes it directly to
their feed."

"Every Monday at 9am, generate a weekly recap from my data
and publish it to my LinkedIn account automatically."

Setting up LinkedIn for your app

Unlike Google Auth (which is fully managed), LinkedIn requires each app creator to register their own LinkedIn developer app. This is a LinkedIn policy — they review every app individually for posting permissions, so the platform can't share one LinkedIn client across all Pentoggle apps.

  1. Create a LinkedIn developer app
    • Go to linkedin.com/developers and click Create App
    • On the Products tab, request both Sign In with LinkedIn using OpenID Connect and Share on LinkedIn
  2. Add the redirect URL
    • On the Auth tab, under Authorized redirect URLs, add exactly: https://pentoggle.com/api/baas/oauth/linkedin/callback
    • The URL must be byte-identical — no trailing slash, no http://, no query parameters
  3. Copy your credentials
    • From the LinkedIn Auth tab, copy your Client ID and Client Secret
  4. Add them in Pentoggle
    • Open your app and go to the Settings tab
    • Find the OAuth Providers section and click on the LinkedIn card
    • Paste your Client ID and Client Secret, then click Save
    • The status flips from Setup needed to Ready

Your LinkedIn Client Secret is encrypted at rest and never exposed to your app's frontend. Until you add the credentials, any sign-in or posting attempt from your app will surface a clear "setup needed" error.

How it works

  1. A user clicks Sign in with LinkedIn or triggers an action that publishes to LinkedIn
  2. The browser is redirected to LinkedIn's consent screen, branded with your LinkedIn developer app
  3. The user approves and LinkedIn issues an authorization code back to Pentoggle's callback endpoint
  4. Pentoggle exchanges the code for tokens server-side using the credentials you saved in Settings, then signs the user in (and/or stores the posting token for later)
  5. For posts: your function calls linkedin.publishPost(...); Pentoggle uses the stored token to publish on the user's behalf and returns the post URN
  6. Tokens are refreshed automatically in the background; users only see a reconnect prompt if LinkedIn fully revokes the session

Limitations

  • Refresh tokens require partner status — LinkedIn only issues refresh tokens to apps in their Programmatic-Refresh-Tokens partner program. Without it, user posting access silently expires after 60 days; the platform surfaces a reconnect nudge to active users
  • Rate limits — 150 posts/member/day and 100,000 posts/app/day (UTC). Generated functions surface a friendly error and stop retrying when limits are hit
  • Email must be present and verified — LinkedIn sign-in fails with a clear error if the user's LinkedIn account doesn't expose a verified email (rare but possible)
  • Multi-image posts: 2-20 images — JPEG/PNG/GIF only, each under ~36 megapixels; 1 image falls back to single-image flow, 0 images is treated as text-only
  • Sponsored carousel ads — different from the multi-image post above; requires LinkedIn Marketing Developer Platform approval and is not exposed by Pentoggle
  • Reading user posts — fetching a user's existing LinkedIn posts requires LinkedIn partner-program approval and is not currently supported

Troubleshooting

  • "redirect_uri does not match" — the URL on LinkedIn's Auth tab must be exactly https://pentoggle.com/api/baas/oauth/linkedin/callback. No trailing slash, no http://, no query string
  • Status stays "Setup needed" after saving credentials — re-open the LinkedIn card; one of the fields may have been pasted with whitespace. Re-paste and save
  • "Email not returned" sign-in error — the user's LinkedIn account either has no email or LinkedIn marked it unverified. They need to verify the email on LinkedIn or use a different account
  • Posting suddenly stops working after ~60 days — the user's access token expired and your app doesn't have refresh tokens. The platform shows the user a reconnect nudge; once they approve again, posting resumes
  • Rate-limit error during a batch — pause and retry after the time the error suggests; the limit is per member and per app, both reset at UTC midnight