How to Set Up LinkedIn API for WordPress
Connect WordPress to LinkedIn without guessing which product, redirect URL, or permission LinkedIn expects. This guide shows the setup used by Devenia LinkedIn Autoposter and works as a general LinkedIn API checklist.
Send the WordPress URL, the LinkedIn posting target, and the exact error if you have one. We will point out the next practical step.
Set up the app before the plugin.
Most connection errors come from missing LinkedIn products, the wrong redirect URL, or unclear company-page permissions. Get those right first, then connect WordPress.
Set up the LinkedIn app before WordPress connects to it
A practical checklist for connecting WordPress with LinkedIn. Plan on about 10 minutes if the LinkedIn company page and privacy policy are ready. ⏱️
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
- Go to LinkedIn Developer Portal
- Click “Create app” (blue button, top right)
- 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)
- 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.
- In your new app, click the “Products” tab
- Find “Share on LinkedIn” and click “Request access”
- Find “Sign In with LinkedIn using OpenID Connect” and click “Request access”
- 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
- Click the “Auth” tab
- You’ll see your Client ID – copy this somewhere safe
- 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.
- Still in the “Auth” tab, scroll down to “OAuth 2.0 settings”
- Under “Authorized redirect URLs for your app”, click the pencil icon to edit
- Click “+ Add redirect URL”
- 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) - Click “Update”
Step 5: Connect Your WordPress Plugin
- In WordPress, go to Settings → LinkedIn Autoposter
- Paste your Client ID and Client Secret
- Click “Save Changes”
- Click “Connect to LinkedIn”
- You’ll be redirected to LinkedIn – click “Allow” to authorize
- 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:
- Request Advertising API access (Step 2 above) and wait for approval
- 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
- In the plugin settings, enter the Organization ID
- Select “Company Page” or “Both” under Post Target
- 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.
Stuck on LinkedIn API setup?
Send the exact error, the WordPress callback URL, and whether you want to post to a profile, a company page, or both. We will help you find the practical next step.