How to Set Up LinkedIn API for WordPress

Complete guide to connecting WordPress with LinkedIn. Takes about 10 minutes. ⏱️

This guide works with our Devenia LinkedIn Autoposter plugin, but the LinkedIn setup applies to any app using the LinkedIn API.


Step 1: Create a LinkedIn App

  1. Go to LinkedIn Developer Portal
  2. Click “Create app” (blue button, top right)
  3. Fill in the form:
    • App name: Something like “My Website Autoposter” (users won’t see this)
    • LinkedIn Page: Select your company page. If you don’t have one, you’ll need to create a LinkedIn Company Page first.
    • Privacy policy URL: Your website’s privacy policy (e.g., https://yoursite.com/privacy)
    • App logo: Upload any square image (minimum 100x100px)
  4. Check the legal agreement box and click “Create app”

Step 2: Add Required Products

LinkedIn requires you to “request access” to specific features. Don’t worry – these are approved instantly.

  1. In your new app, click the “Products” tab
  2. Find “Share on LinkedIn” and click “Request access”
  3. Find “Sign In with LinkedIn using OpenID Connect” and click “Request access”
  4. Both should show as “Added” within seconds

Want to post to a Company Page? You’ll also need the “Advertising API”. Click “Request access” – this one takes 1-5 business days for LinkedIn to approve. You can still post to your personal profile while waiting.


Step 3: Get Your Credentials

  1. Click the “Auth” tab
  2. You’ll see your Client ID – copy this somewhere safe
  3. Click the eye icon next to Client Secret to reveal it, then copy it

⚠️ Keep your Client Secret private! Anyone with this can post to your LinkedIn. Never share it publicly or commit it to version control.


Step 4: Add the Redirect URL

This tells LinkedIn where to send users after they authorize your app.

  1. Still in the “Auth” tab, scroll down to “OAuth 2.0 settings”
  2. Under “Authorized redirect URLs for your app”, click the pencil icon to edit
  3. Click “+ Add redirect URL”
  4. Enter your WordPress callback URL. For our plugin, it’s:
    https://yoursite.com/wp-admin/options-general.php?page=dlap-settings
    (Replace “yoursite.com” with your actual domain)
  5. Click “Update”

Step 5: Connect Your WordPress Plugin

  1. In WordPress, go to Settings → LinkedIn Autoposter
  2. Paste your Client ID and Client Secret
  3. Click “Save Changes”
  4. Click “Connect to LinkedIn”
  5. You’ll be redirected to LinkedIn – click “Allow” to authorize
  6. You’ll be redirected back to WordPress with a success message

That’s it! Your WordPress site is now connected to LinkedIn. New posts will be shared automatically.


Posting to a Company Page (Optional)

If you want posts to appear on your company page instead of (or in addition to) your personal profile:

  1. Request Advertising API access (Step 2 above) and wait for approval
  2. Find your Company Page ID:
    • Go to your company page on LinkedIn
    • Click “Admin tools” → “Manage page”
    • Look at the URL – it will be like: linkedin.com/company/12345678/admin/
    • That number is your Organization ID
  3. In the plugin settings, enter the Organization ID
  4. Select “Company Page” or “Both” under Post Target
  5. Click “Reconnect” to authorize the additional permissions

Common Issues

“Redirect URL mismatch” error

The URL in your LinkedIn app settings must exactly match what WordPress sends. Check for:

  • http vs https (must match)
  • www vs non-www (must match)
  • Trailing slashes

“Token expired” after 60 days

This is normal. LinkedIn limits tokens to 60 days for security. Just click “Reconnect” in the plugin settings. The plugin will email you a warning before expiration.

“Organization permissions” error when posting to company page

You need Advertising API access. Check the Products tab in your LinkedIn app – if “Advertising API” isn’t listed as added, request it and wait for approval.


Need the Plugin?

Get our free LinkedIn Autoposter plugin to automatically share your WordPress posts.